From 4366125d2580982abb57bc65a26fc1fb8ef2a5df Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Tue, 21 Jan 2020 01:08:43 -0500 Subject: New upstream version 1.12.3 --- test/test_downloader.py | 1 + test/test_results.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'test') 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"] -- cgit v1.2.3