From 493bd235cf6c4f031dee047b57a897622bc88d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 26 Jul 2017 10:33:15 +0200 Subject: [PATCH] workaround for missing 'assert_called_once' method this method was introduced in Python 3.6, but calling it still works (i.e. it doesn't cause the test to fail) on Python 3.3/3.4 --- gallery_dl/version.py | 2 +- test/test_cookies.py | 2 +- test/test_extractors.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gallery_dl/version.py b/gallery_dl/version.py index 5defc88e..680765fe 100644 --- a/gallery_dl/version.py +++ b/gallery_dl/version.py @@ -6,4 +6,4 @@ # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. -__version__ = "0.9.1" +__version__ = "1.0.0-dev" diff --git a/test/test_cookies.py b/test/test_cookies.py index faa1817d..5d069fbe 100644 --- a/test/test_cookies.py +++ b/test/test_cookies.py @@ -69,7 +69,7 @@ class TestCookiejar(unittest.TestCase): with mock.patch.object(log, "warning") as mock_warning: cookies = extractor.find("test:").session.cookies self.assertEqual(len(cookies), 0) - mock_warning.assert_called_once() + self.assertEqual(mock_warning.call_count, 1) self.assertEqual(mock_warning.call_args[0][0], "cookies: %s") self.assertIsInstance(mock_warning.call_args[0][1], exc) diff --git a/test/test_extractors.py b/test/test_extractors.py index 47bfe7ad..274ee78c 100644 --- a/test/test_extractors.py +++ b/test/test_extractors.py @@ -58,7 +58,7 @@ skip = [ "exhentai", "kissmanga", "mangafox", "dynastyscans", "nijie", "archivedmoe", "archiveofsins", "thebarchive", # temporary issues - + "twitter", ] # enable selective testing for direct calls if __name__ == '__main__' and len(sys.argv) > 1: