Remove json.dumps from test_api.py
Remove unnecessary changes to tests, revert assertions back to how they were. Remove unnecessary join from formatter in `_api.py`
This commit is contained in:
		
							parent
							
								
									1c0d584959
								
							
						
					
					
						commit
						5861bdb104
					
				|  | @ -133,8 +133,8 @@ class YouTubeTranscriptApi(): | |||
|         Formatter = formats.get_formatter(format) | ||||
|         transcript = cls.list_transcripts( | ||||
|             video_id,proxies, cookies).find_transcript(languages).fetch() | ||||
|         return ''.join(Formatter.format(transcript)) | ||||
|      | ||||
|         return Formatter.format(transcript) | ||||
| 
 | ||||
|     @classmethod | ||||
|     def _load_cookies(cls, cookies, video_id): | ||||
|         cookie_jar = {} | ||||
|  |  | |||
|  | @ -50,11 +50,11 @@ class TestYouTubeTranscriptApi(TestCase): | |||
| 
 | ||||
|         self.assertEqual( | ||||
|             transcript, | ||||
|             json.dumps([ | ||||
|             [ | ||||
|                 {'text': 'Hey, this is just a test', 'start': 0.0, 'duration': 1.54}, | ||||
|                 {'text': 'this is not the original transcript', 'start': 1.54, 'duration': 4.16}, | ||||
|                 {'text': 'just something shorter, I made up for testing', 'start': 5.7, 'duration': 3.239} | ||||
|             ]) | ||||
|             ] | ||||
|         ) | ||||
| 
 | ||||
|     def test_list_transcripts(self): | ||||
|  | @ -165,11 +165,11 @@ class TestYouTubeTranscriptApi(TestCase): | |||
|         ) | ||||
|         self.assertEqual( | ||||
|             transcript, | ||||
|             json.dumps([ | ||||
|             [ | ||||
|                 {'text': 'Hey, this is just a test', 'start': 0.0, 'duration': 1.54}, | ||||
|                 {'text': 'this is not the original transcript', 'start': 1.54, 'duration': 4.16}, | ||||
|                 {'text': 'just something shorter, I made up for testing', 'start': 5.7, 'duration': 3.239} | ||||
|             ]) | ||||
|             ] | ||||
|         ) | ||||
|      | ||||
|     def test_get_transcript__with_cookies(self): | ||||
|  | @ -179,11 +179,11 @@ class TestYouTubeTranscriptApi(TestCase): | |||
| 
 | ||||
|         self.assertEqual( | ||||
|             transcript, | ||||
|             json.dumps([ | ||||
|             [ | ||||
|                 {'text': 'Hey, this is just a test', 'start': 0.0, 'duration': 1.54}, | ||||
|                 {'text': 'this is not the original transcript', 'start': 1.54, 'duration': 4.16}, | ||||
|                 {'text': 'just something shorter, I made up for testing', 'start': 5.7, 'duration': 3.239} | ||||
|             ]) | ||||
|             ] | ||||
|         ) | ||||
| 
 | ||||
|     @patch('youtube_transcript_api.YouTubeTranscriptApi.get_transcript') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue