diff options
Diffstat (limited to 'tests/test_store.py')
-rw-r--r-- | tests/test_store.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_store.py b/tests/test_store.py index ee7e063..58e76e0 100644 --- a/tests/test_store.py +++ b/tests/test_store.py | |||
@@ -380,7 +380,7 @@ class BalanceStoreTest(WebMockTestCase): | |||
380 | balance_store.fetch_balances(tag="foo") | 380 | balance_store.fetch_balances(tag="foo") |
381 | self.assertEqual(0, balance_store.all["ETC"].total) | 381 | self.assertEqual(0, balance_store.all["ETC"].total) |
382 | self.assertListEqual(["USDT", "XVG", "XMR", "ETC"], list(balance_store.currencies())) | 382 | self.assertListEqual(["USDT", "XVG", "XMR", "ETC"], list(balance_store.currencies())) |
383 | self.m.report.log_balances.assert_called_with(tag="foo") | 383 | self.m.report.log_balances.assert_called_with(tag="foo", checkpoint=None) |
384 | 384 | ||
385 | with self.subTest(log_tickers=True),\ | 385 | with self.subTest(log_tickers=True),\ |
386 | mock.patch.object(balance_store, "in_currency") as in_currency: | 386 | mock.patch.object(balance_store, "in_currency") as in_currency: |
@@ -388,7 +388,7 @@ class BalanceStoreTest(WebMockTestCase): | |||
388 | balance_store.fetch_balances(log_tickers=True, ticker_currency="FOO", | 388 | balance_store.fetch_balances(log_tickers=True, ticker_currency="FOO", |
389 | ticker_compute_value="compute", ticker_type="type") | 389 | ticker_compute_value="compute", ticker_type="type") |
390 | self.m.report.log_balances.assert_called_with(compute_value='compute', | 390 | self.m.report.log_balances.assert_called_with(compute_value='compute', |
391 | tag=None, ticker_currency='FOO', tickers='tickers', | 391 | tag=None, checkpoint=None, ticker_currency='FOO', tickers='tickers', |
392 | type='type') | 392 | type='type') |
393 | 393 | ||
394 | balance_store = market.BalanceStore(self.m) | 394 | balance_store = market.BalanceStore(self.m) |
@@ -425,7 +425,7 @@ class BalanceStoreTest(WebMockTestCase): | |||
425 | self.assertEqual(D("2.6"), amounts["BTC"].value) | 425 | self.assertEqual(D("2.6"), amounts["BTC"].value) |
426 | self.assertEqual(D("7.5"), amounts["XEM"].value) | 426 | self.assertEqual(D("7.5"), amounts["XEM"].value) |
427 | self.assertEqual(D("-1.0"), amounts["DASH"].value) | 427 | self.assertEqual(D("-1.0"), amounts["DASH"].value) |
428 | self.m.report.log_balances.assert_called_with(tag=None) | 428 | self.m.report.log_balances.assert_called_with(tag=None, checkpoint=None) |
429 | self.m.report.log_dispatch.assert_called_once_with(portfolio.Amount("BTC", | 429 | self.m.report.log_dispatch.assert_called_once_with(portfolio.Amount("BTC", |
430 | "11.1"), amounts, "medium", repartition_hash) | 430 | "11.1"), amounts, "medium", repartition_hash) |
431 | 431 | ||
@@ -617,12 +617,14 @@ class ReportStoreTest(WebMockTestCase): | |||
617 | ]) | 617 | ]) |
618 | add_log.assert_called_once_with({ | 618 | add_log.assert_called_once_with({ |
619 | 'type': 'balance', | 619 | 'type': 'balance', |
620 | 'checkpoint': None, | ||
620 | 'balances': 'json', | 621 | 'balances': 'json', |
621 | 'tag': 'tag' | 622 | 'tag': 'tag' |
622 | }) | 623 | }) |
623 | add_redis_status.assert_called_once_with({ | 624 | add_redis_status.assert_called_once_with({ |
624 | 'type': 'balance', | 625 | 'type': 'balance', |
625 | 'balances': 'json', | 626 | 'balances': 'json', |
627 | 'checkpoint': None, | ||
626 | 'tag': 'tag' | 628 | 'tag': 'tag' |
627 | }) | 629 | }) |
628 | add_log.reset_mock() | 630 | add_log.reset_mock() |
@@ -639,6 +641,7 @@ class ReportStoreTest(WebMockTestCase): | |||
639 | type="total") | 641 | type="total") |
640 | add_log.assert_called_once_with({ | 642 | add_log.assert_called_once_with({ |
641 | 'type': 'balance', | 643 | 'type': 'balance', |
644 | 'checkpoint': None, | ||
642 | 'balances': 'json', | 645 | 'balances': 'json', |
643 | 'tag': 'tag', | 646 | 'tag': 'tag', |
644 | 'tickers': { | 647 | 'tickers': { |
@@ -658,6 +661,7 @@ class ReportStoreTest(WebMockTestCase): | |||
658 | }) | 661 | }) |
659 | add_redis_status.assert_called_once_with({ | 662 | add_redis_status.assert_called_once_with({ |
660 | 'type': 'balance', | 663 | 'type': 'balance', |
664 | 'checkpoint': None, | ||
661 | 'balances': 'json', | 665 | 'balances': 'json', |
662 | 'tag': 'tag', | 666 | 'tag': 'tag', |
663 | 'tickers': { | 667 | 'tickers': { |