Fix test_youtube_mix
authordf <fieldhouse@gmx.net>
Fri, 29 Oct 2021 02:03:00 +0000 (03:03 +0100)
committerdirkf <fieldhouse@gmx.net>
Sat, 29 Jan 2022 20:00:21 +0000 (20:00 +0000)
test/test_youtube_lists.py

index e1636a1a6d6058f919a2048ea0578869bbb0c099..fae8a950a4bea4b31538965f06e4a9a449f848d6 100644 (file)
@@ -34,12 +34,14 @@ class TestYoutubeLists(unittest.TestCase):
 
     def test_youtube_mix(self):
         dl = FakeYDL()
-        ie = YoutubePlaylistIE(dl)
-        result = ie.extract('https://www.youtube.com/watch?v=W01L70IGBgE&index=2&list=RDOQpdSVF_k_w')
-        entries = result['entries']
+        dl.params['format'] = 'best'
+        ie = YoutubeTabIE(dl)
+        result = dl.extract_info('https://www.youtube.com/watch?v=uVJ0Il5WvbE&list=PLhQjrBD2T381k8ul4WQ8SQ165XqY149WW',
+                                 download=False, ie_key=ie.ie_key(), process=True)
+        entries = (result or {}).get('entries', [{'id': 'not_found', }])
         self.assertTrue(len(entries) >= 50)
         original_video = entries[0]
-        self.assertEqual(original_video['id'], 'OQpdSVF_k_w')
+        self.assertEqual(original_video['id'], 'uVJ0Il5WvbE')
 
     def test_youtube_toptracks(self):
         print('Skipping: The playlist page gives error 500')