diff options
| author | 2020-01-21 01:08:43 -0500 | |
|---|---|---|
| committer | 2020-01-21 01:08:43 -0500 | |
| commit | 4366125d2580982abb57bc65a26fc1fb8ef2a5df (patch) | |
| tree | 743a26348e360c8b7f5eb89d4f704b015e902e68 /test | |
| parent | bc435e826dbe37969d9cbe280f58810d054932cc (diff) | |
New upstream version 1.12.3upstream/1.12.3
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_downloader.py | 1 | ||||
| -rw-r--r-- | test/test_results.py | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/test/test_downloader.py b/test/test_downloader.py index a7c4ce6..c43b533 100644 --- a/test/test_downloader.py +++ b/test/test_downloader.py @@ -98,6 +98,7 @@ class TestDownloaderBase(unittest.TestCase): @classmethod def setUpClass(cls): cls.extractor = extractor.find("test:") + cls.extractor.log.job = None cls.dir = tempfile.TemporaryDirectory() cls.fnum = 0 config.set((), "base-directory", cls.dir.name) 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"] |
