X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=test.py;h=fc331c314825261dc30c8f4947e040064083f502;hb=eb9c92e155941b51042ba57e23f651454bd8e55a;hpb=17ff995eb623dcaea579e33e507091d6169c52e5;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git diff --git a/test.py b/test.py index 34b2fe3..fc331c3 100644 --- a/test.py +++ b/test.py @@ -1075,6 +1075,16 @@ class HelperTest(WebMockTestCase): follow_orders.assert_called() log_stage.assert_called_with("process_sell_all__2_all_buy_end") + def test_reset_all(self): + portfolio.BalanceStore.all = { "foo": "bar" } + portfolio.ReportStore.logs.append("hey") + portfolio.TradeStore.all.append("bouh") + + helper.reset_all() + + self.assertEqual(0, len(portfolio.BalanceStore.all)) + self.assertEqual(0, len(portfolio.ReportStore.logs)) + self.assertEqual(0, len(portfolio.TradeStore.all)) @unittest.skipUnless("unit" in limits, "Unit skipped") class TradeStoreTest(WebMockTestCase):