From 0c79fad318711394874d94672e96db6da1ed9c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 12 Feb 2018 02:08:50 +0100 Subject: Fix move_balance not moving currencies absent from trades --- test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test.py') diff --git a/test.py b/test.py index 26646be..1965521 100644 --- a/test.py +++ b/test.py @@ -724,7 +724,8 @@ class HelperTest(WebMockTestCase): portfolio.TradeStore.all = [trade1, trade2, trade3] balance1 = portfolio.Balance("BTC", { "margin_free": "0" }) balance2 = portfolio.Balance("USDT", { "margin_free": "100" }) - portfolio.BalanceStore.all = {"BTC": balance1, "USDT": balance2} + balance3 = portfolio.Balance("ETC", { "margin_free": "10" }) + portfolio.BalanceStore.all = {"BTC": balance1, "USDT": balance2, "ETC": balance3} market = mock.Mock() @@ -736,6 +737,7 @@ class HelperTest(WebMockTestCase): else: market.transfer_balance.assert_any_call("BTC", 3, "exchange", "margin") market.transfer_balance.assert_any_call("USDT", 50, "margin", "exchange") + market.transfer_balance.assert_any_call("ETC", 10, "margin", "exchange") @mock.patch.object(helper, "prepare_trades") @mock.patch.object(portfolio.TradeStore, "prepare_orders") -- cgit v1.2.3