X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git;a=blobdiff_plain;f=test.py;h=14b5559a354fb173e26f3966c31b600b1c1eeaae;hp=fbc857dbc64729a7969c9f0655b312c5827fd967;hb=23f4616a85bef7e9acc57740f889a2a0346788af;hpb=7192b2e1315c3dfd1204d609d716dd07e90f3bf4 diff --git a/test.py b/test.py index fbc857d..14b5559 100644 --- a/test.py +++ b/test.py @@ -2920,7 +2920,7 @@ class HelperTest(WebMockTestCase): sell.reset_mock() with self.subTest(action="print_balances"),\ mock.patch("helper.print_balances") as print_balances: - helper.main_process_market("user", "print_balances") + helper.main_process_market("user", ["print_balances"]) buy.assert_not_called() wait.assert_not_called() @@ -2928,17 +2928,19 @@ class HelperTest(WebMockTestCase): print_balances.assert_called_once_with("user") with self.subTest(action="print_orders"),\ - mock.patch("helper.print_orders") as print_orders: - helper.main_process_market("user", "print_orders") + mock.patch("helper.print_orders") as print_orders,\ + mock.patch("helper.print_balances") as print_balances: + helper.main_process_market("user", ["print_orders", "print_balances"]) buy.assert_not_called() wait.assert_not_called() sell.assert_not_called() print_orders.assert_called_once_with("user") + print_balances.assert_called_once_with("user") with self.subTest(action="unknown"),\ self.assertRaises(NotImplementedError): - helper.main_process_market("user", "unknown") + helper.main_process_market("user", ["unknown"]) @mock.patch.object(helper, "psycopg2") def test_fetch_markets(self, psycopg2):