From df05dc0ce66852c337c26e823eee6fb5deca0b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Fri, 12 Jul 2013 13:17:17 +0200 Subject: [PATCH] Check if the info_dict has an url or a parts field in the tests --- test/test_download.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_download.py b/test/test_download.py index dd5818dba..8026b7f36 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -151,8 +151,9 @@ def generator(test_case): sys.stderr.write(u'\n"info_dict": ' + json.dumps(test_info_dict, ensure_ascii=False, indent=2) + u'\n') # Check for the presence of mandatory fields - for key in ('id', 'url', 'title', 'ext'): + for key in ('id', 'title', 'ext'): self.assertTrue(key in info_dict.keys() and info_dict[key]) + self.assertTrue(any(key in info_dict.keys() and info_dict[key] for key in ('url', 'parts'))) # Check for mandatory fields that are automatically set by YoutubeDL for key in ['webpage_url', 'extractor', 'extractor_key']: self.assertTrue(info_dict.get(key), u'Missing field: %s' % key)