+ self.m.ccxt.fetch_all_balances.return_value = {
+ "ETC": {
+ "exchange_free": 0,
+ "exchange_used": 0,
+ "exchange_total": 0,
+ "margin_total": 0,
+ },
+ "XVG": {
+ "exchange_free": 16,
+ "exchange_used": 0,
+ "exchange_total": 16,
+ "margin_total": 0,
+ },
+ "XMR": {
+ "exchange_free": 0,
+ "exchange_used": 0,
+ "exchange_total": 0,
+ "margin_total": D("-1.0"),
+ "margin_free": 0,
+ },
+ }
+
+ balance_store = market.BalanceStore(self.m)
+ with self.subTest(add_usdt=True),\
+ mock.patch.object(market.Portfolio, "repartition") as repartition:
+ repartition.return_value = {
+ "DOGE": D("0.5"),
+ "ETH": D("0.5"),
+ }
+ balance_store.fetch_balances(add_usdt=True)
+ self.assertListEqual(["XVG", "XMR", "USDT"], list(balance_store.currencies()))