]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[tests] Allow multi_video to be tested as playlists
authorYen Chi Hsuan <yan12125@gmail.com>
Sun, 19 Apr 2015 11:08:37 +0000 (19:08 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sun, 19 Apr 2015 11:08:37 +0000 (19:08 +0800)
test/helper.py
test/test_download.py

index 12afdf184f0215e9947515cd3a8516ccad2e480e..e1129e58f44c9f5118b16a52dacdd869d3dd0123 100644 (file)
@@ -150,7 +150,7 @@ def expect_info_dict(self, got_dict, expected_dict):
                              'invalid value for field %s, expected %r, got %r' % (info_field, expected, got))
 
     # Check for the presence of mandatory fields
-    if got_dict.get('_type') != 'playlist':
+    if got_dict.get('_type') not in ('playlist', 'multi_video'):
         for key in ('id', 'url', 'title', 'ext'):
             self.assertTrue(got_dict.get(key), 'Missing mandatory field %s' % key)
     # Check for mandatory fields that are automatically set by YoutubeDL
index 6a149ae4f707e1dc048890b72a4903ccb8a5f785..1110357a7e8097eb38479d2a15837516af32a726 100644 (file)
@@ -153,7 +153,7 @@ def generator(test_case):
                     break
 
             if is_playlist:
-                self.assertEqual(res_dict['_type'], 'playlist')
+                self.assertTrue(res_dict['_type'] in ['playlist', 'multi_video'])
                 self.assertTrue('entries' in res_dict)
                 expect_info_dict(self, res_dict, test_case.get('info_dict', {}))