[test_download] Allow lists for md5 check
This commit is contained in:
parent
dab647a7b6
commit
55488dcbfc
@ -185,7 +185,10 @@ def generator(test_case):
|
|||||||
format_bytes(got_fsize)))
|
format_bytes(got_fsize)))
|
||||||
if 'md5' in tc:
|
if 'md5' in tc:
|
||||||
md5_for_file = _file_md5(tc_filename)
|
md5_for_file = _file_md5(tc_filename)
|
||||||
self.assertEqual(md5_for_file, tc['md5'])
|
if isinstance(tc['md5'], str):
|
||||||
|
self.assertEqual(md5_for_file, tc['md5'])
|
||||||
|
else:
|
||||||
|
self.assertTrue(md5_for_file in tc['md5'])
|
||||||
info_json_fn = os.path.splitext(tc_filename)[0] + '.info.json'
|
info_json_fn = os.path.splitext(tc_filename)[0] + '.info.json'
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
os.path.exists(info_json_fn),
|
os.path.exists(info_json_fn),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user