balance_store.fetch_balances(tag="foo")
self.assertEqual(0, balance_store.all["ETC"].total)
self.assertListEqual(["USDT", "XVG", "XMR", "ETC"], list(balance_store.currencies()))
- self.m.report.log_balances.assert_called_with(tag="foo")
+ self.m.report.log_balances.assert_called_with(tag="foo", checkpoint=None)
with self.subTest(log_tickers=True),\
mock.patch.object(balance_store, "in_currency") as in_currency:
balance_store.fetch_balances(log_tickers=True, ticker_currency="FOO",
ticker_compute_value="compute", ticker_type="type")
self.m.report.log_balances.assert_called_with(compute_value='compute',
- tag=None, ticker_currency='FOO', tickers='tickers',
+ tag=None, checkpoint=None, ticker_currency='FOO', tickers='tickers',
type='type')
balance_store = market.BalanceStore(self.m)
self.assertEqual(D("2.6"), amounts["BTC"].value)
self.assertEqual(D("7.5"), amounts["XEM"].value)
self.assertEqual(D("-1.0"), amounts["DASH"].value)
- self.m.report.log_balances.assert_called_with(tag=None)
+ self.m.report.log_balances.assert_called_with(tag=None, checkpoint=None)
self.m.report.log_dispatch.assert_called_once_with(portfolio.Amount("BTC",
"11.1"), amounts, "medium", repartition_hash)
])
add_log.assert_called_once_with({
'type': 'balance',
+ 'checkpoint': None,
'balances': 'json',
'tag': 'tag'
})
add_redis_status.assert_called_once_with({
'type': 'balance',
'balances': 'json',
+ 'checkpoint': None,
'tag': 'tag'
})
add_log.reset_mock()
type="total")
add_log.assert_called_once_with({
'type': 'balance',
+ 'checkpoint': None,
'balances': 'json',
'tag': 'tag',
'tickers': {
})
add_redis_status.assert_called_once_with({
'type': 'balance',
+ 'checkpoint': None,
'balances': 'json',
'tag': 'tag',
'tickers': {