Add additional test case for `TranscriptsDisabled`
This commit is contained in:
		
							parent
							
								
									bd8d8919b2
								
							
						
					
					
						commit
						b8dbc97549
					
				
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -205,6 +205,14 @@ class TestYouTubeTranscriptApi(TestCase): | ||||||
|         with self.assertRaises(TranscriptsDisabled): |         with self.assertRaises(TranscriptsDisabled): | ||||||
|             YouTubeTranscriptApi.get_transcript('dsMFmonKDD4') |             YouTubeTranscriptApi.get_transcript('dsMFmonKDD4') | ||||||
| 
 | 
 | ||||||
|  |         httpretty.register_uri( | ||||||
|  |             httpretty.GET, | ||||||
|  |             'https://www.youtube.com/watch', | ||||||
|  |             body=load_asset('youtube_transcripts_disabled2.html.static') | ||||||
|  |         ) | ||||||
|  |         with self.assertRaises(TranscriptsDisabled): | ||||||
|  |             YouTubeTranscriptApi.get_transcript('Fjg5lYqvzUs') | ||||||
|  | 
 | ||||||
|     def test_get_transcript__exception_if_language_unavailable(self): |     def test_get_transcript__exception_if_language_unavailable(self): | ||||||
|         with self.assertRaises(NoTranscriptFound): |         with self.assertRaises(NoTranscriptFound): | ||||||
|             YouTubeTranscriptApi.get_transcript('GJLlxj_dtq8', languages=['cz']) |             YouTubeTranscriptApi.get_transcript('GJLlxj_dtq8', languages=['cz']) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue