X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Ftest_main.py;h=06fc84ef5e4492e4d98a905dd42675b56c2aacba;hb=0112c1c2b451346813224e2e5409b31aa4f960b2;hp=6396c07728e3d01677962627e86e1add5203a947;hpb=c682bdf4a02a45312ef1aadf8aa26136cf308414;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git diff --git a/tests/test_main.py b/tests/test_main.py index 6396c07..06fc84e 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,7 +1,6 @@ from .helper import * import main, market -@unittest.skipUnless("unit" in limits, "Unit skipped") class MainTest(WebMockTestCase): def test_make_order(self): self.m.get_ticker.return_value = { @@ -179,7 +178,8 @@ class MainTest(WebMockTestCase): mock.patch("main.parse_config") as parse_config,\ mock.patch("main.fetch_markets") as fetch_markets,\ mock.patch("main.process") as process,\ - mock.patch("store.Portfolio.start_worker") as start: + mock.patch("store.Portfolio.start_worker") as start,\ + mock.patch("store.Portfolio.stop_worker") as stop: args_mock = mock.Mock() args_mock.parallel = True @@ -196,6 +196,7 @@ class MainTest(WebMockTestCase): parse_config.assert_called_with(args_mock) fetch_markets.assert_called_with("pg_config", "user") + stop.assert_called_once_with() start.assert_called_once_with() self.assertEqual(2, process.call_count) process.assert_has_calls([