diff options
Diffstat (limited to 'test/test_results.py')
| -rw-r--r-- | test/test_results.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/test_results.py b/test/test_results.py index 869ff83..e87b4b8 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2015-2019 Mike Fährmann +# Copyright 2015-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 @@ -21,12 +21,12 @@ TRAVIS_SKIP = { "exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie", "bobx", "archivedmoe", "archiveofsins", "thebarchive", "fireden", "4plebs", "sankaku", "idolcomplex", "mangahere", "readcomiconline", "mangadex", - "sankakucomplex", "warosu", "fuskator", + "sankakucomplex", "warosu", "fuskator", "patreon", } # temporary issues, etc. BROKEN = { - "erolord", + "imxto", "mangapark", "photobucket", } @@ -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"] |
