mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 07:57:07 -05:00 
			
		
		
		
	[test/test_http] Update tests
After switching to HTML5 extraction helpers in generic.py, the result info_dict is always a playlist.
This commit is contained in:
		@@ -87,7 +87,7 @@ class TestHTTP(unittest.TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        ydl = YoutubeDL({'logger': FakeLogger()})
 | 
					        ydl = YoutubeDL({'logger': FakeLogger()})
 | 
				
			||||||
        r = ydl.extract_info('http://localhost:%d/302' % self.port)
 | 
					        r = ydl.extract_info('http://localhost:%d/302' % self.port)
 | 
				
			||||||
        self.assertEqual(r['url'], 'http://localhost:%d/vid.mp4' % self.port)
 | 
					        self.assertEqual(r['entries'][0]['url'], 'http://localhost:%d/vid.mp4' % self.port)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class TestHTTPS(unittest.TestCase):
 | 
					class TestHTTPS(unittest.TestCase):
 | 
				
			||||||
@@ -111,7 +111,7 @@ class TestHTTPS(unittest.TestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        ydl = YoutubeDL({'logger': FakeLogger(), 'nocheckcertificate': True})
 | 
					        ydl = YoutubeDL({'logger': FakeLogger(), 'nocheckcertificate': True})
 | 
				
			||||||
        r = ydl.extract_info('https://localhost:%d/video.html' % self.port)
 | 
					        r = ydl.extract_info('https://localhost:%d/video.html' % self.port)
 | 
				
			||||||
        self.assertEqual(r['url'], 'https://localhost:%d/vid.mp4' % self.port)
 | 
					        self.assertEqual(r['entries'][0]['url'], 'https://localhost:%d/vid.mp4' % self.port)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def _build_proxy_handler(name):
 | 
					def _build_proxy_handler(name):
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user