fix job tests for Python 3.4 and 3.5
assert_called() and assert_not_called() got added in Python 3.6
This commit is contained in:
@@ -276,12 +276,12 @@ class TestDataJob(TestJob):
|
|||||||
|
|
||||||
with patch("gallery_dl.util.number_to_string") as nts:
|
with patch("gallery_dl.util.number_to_string") as nts:
|
||||||
tjob.run()
|
tjob.run()
|
||||||
nts.assert_not_called()
|
self.assertEqual(len(nts.call_args_list), 0)
|
||||||
|
|
||||||
config.set(("output",), "num-to-str", True)
|
config.set(("output",), "num-to-str", True)
|
||||||
with patch("gallery_dl.util.number_to_string") as nts:
|
with patch("gallery_dl.util.number_to_string") as nts:
|
||||||
tjob.run()
|
tjob.run()
|
||||||
nts.assert_called()
|
self.assertEqual(len(nts.call_args_list), 52)
|
||||||
|
|
||||||
tjob.run()
|
tjob.run()
|
||||||
self.assertEqual(tjob.data[-1][0], Message.Url)
|
self.assertEqual(tjob.data[-1][0], Message.Url)
|
||||||
|
|||||||
Reference in New Issue
Block a user