aboutsummaryrefslogtreecommitdiff
path: root/test/helper.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-08-21 11:52:07 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-08-21 11:52:07 +0200
commite8ee972c6ea211a51275c8eb8bfc81b9ae3a9844 (patch)
tree4ab2920fb57fc777c28af30cf4c38166c81005d2 /test/helper.py
parentaf8322d2f993653dbec5e6ad943f8cc632b901e4 (diff)
downloadyoutube-dl-e8ee972c6ea211a51275c8eb8bfc81b9ae3a9844.tar.xz
Allow playlist test definitions in test_download.
This moves playlist tests where they belong, i.e. to the extractors themselves. Additionally, all our network interaction configuration for tests in test_download now applies to playlist tests as well.
Diffstat (limited to 'test/helper.py')
-rw-r--r--test/helper.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/helper.py b/test/helper.py
index b7299fb82..22d763860 100644
--- a/test/helper.py
+++ b/test/helper.py
@@ -117,8 +117,9 @@ def expect_info_dict(self, expected_dict, got_dict):
u'invalid value for field %s, expected %r, got %r' % (info_field, expected, got))
# Check for the presence of mandatory fields
- for key in ('id', 'url', 'title', 'ext'):
- self.assertTrue(got_dict.get(key), 'Missing mandatory field %s' % key)
+ if got_dict.get('_type') != 'playlist':
+ 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
for key in ['webpage_url', 'extractor', 'extractor_key']:
self.assertTrue(got_dict.get(key), u'Missing field: %s' % key)