aboutsummaryrefslogtreecommitdiff
path: root/tests/test_store.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_store.py')
-rw-r--r--tests/test_store.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_store.py b/tests/test_store.py
index 1a722b5..3097f6d 100644
--- a/tests/test_store.py
+++ b/tests/test_store.py
@@ -1537,6 +1537,18 @@ class PortfolioTest(WebMockTestCase):
1537 get_cryptoportfolio.assert_called_once_with() 1537 get_cryptoportfolio.assert_called_once_with()
1538 retrieve_cryptoportfolio.assert_called_once_with() 1538 retrieve_cryptoportfolio.assert_called_once_with()
1539 1539
1540 retrieve_cryptoportfolio.reset_mock()
1541 get_cryptoportfolio.reset_mock()
1542
1543 with self.subTest("absent liquidities"):
1544 market.Portfolio.last_date = store.LockedVar("2018-03-15")
1545 self.assertIsNone(market.Portfolio.repartition())
1546
1547 with self.subTest("no liquidities"):
1548 market.Portfolio.liquidities = store.LockedVar({})
1549 market.Portfolio.last_date = store.LockedVar("2018-03-08")
1550 self.assertIsNone(market.Portfolio.repartition())
1551
1540 @mock.patch.object(market.time, "sleep") 1552 @mock.patch.object(market.time, "sleep")
1541 @mock.patch.object(market.Portfolio, "get_cryptoportfolio") 1553 @mock.patch.object(market.Portfolio, "get_cryptoportfolio")
1542 def test_wait_for_recent(self, get_cryptoportfolio, sleep): 1554 def test_wait_for_recent(self, get_cryptoportfolio, sleep):