mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-25 04:02:32 +01:00
allow multiple hashes for content tests
This commit is contained in:
parent
f498a9057f
commit
174117f827
@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2019 Mike Fährmann
|
||||
# Copyright 2019-2020 Mike Fährmann
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License version 2 as
|
||||
@ -41,7 +41,8 @@ class SlickpicAlbumExtractor(SlickpicExtractor):
|
||||
}),
|
||||
("https://mattcrandall.slickpic.com/albums/LamborghiniMurcielago/", {
|
||||
"range": "34",
|
||||
"content": "cec6630e659dc72db1ee1a9a6f3b525189261988",
|
||||
"content": ("cec6630e659dc72db1ee1a9a6f3b525189261988",
|
||||
"6f81e1e74c6cd6db36844e7211eef8e7cd30055d"),
|
||||
}),
|
||||
)
|
||||
|
||||
|
@ -109,7 +109,12 @@ class TestExtractorResults(unittest.TestCase):
|
||||
self.assertEqual(result["url"], tjob.url_hash.hexdigest())
|
||||
|
||||
if "content" in result:
|
||||
self.assertEqual(result["content"], tjob.content_hash.hexdigest())
|
||||
expected = result["content"]
|
||||
digest = tjob.content_hash.hexdigest()
|
||||
if isinstance(expected, str):
|
||||
self.assertEqual(digest, expected, "content")
|
||||
else: # assume iterable
|
||||
self.assertIn(digest, expected, "content")
|
||||
|
||||
if "keyword" in result:
|
||||
expected = result["keyword"]
|
||||
|
Loading…
Reference in New Issue
Block a user