]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[test/test_http] Update tests
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 11 Oct 2016 17:41:41 +0000 (01:41 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 11 Oct 2016 17:41:41 +0000 (01:41 +0800)
After switching to HTML5 extraction helpers in generic.py, the result
info_dict is always a playlist.

test/test_http.py

index fdc68ccb42c85410788ecb7bcb1eafd802b3a794..bb0a098e48f5cae93cade9b4bc99c4a4d1a545ed 100644 (file)
@@ -87,7 +87,7 @@ class TestHTTP(unittest.TestCase):
 
         ydl = YoutubeDL({'logger': FakeLogger()})
         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):
@@ -111,7 +111,7 @@ class TestHTTPS(unittest.TestCase):
 
         ydl = YoutubeDL({'logger': FakeLogger(), 'nocheckcertificate': True})
         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):