aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--market.py2
-rw-r--r--tests/test_market.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/market.py b/market.py
index ce0c48c..ce41841 100644
--- a/market.py
+++ b/market.py
@@ -85,6 +85,8 @@ class Market:
85 conn.set(key, log, ex=31*24*60*60) 85 conn.set(key, log, ex=31*24*60*60)
86 key = "/cryptoportfolio/{}/latest/{}".format(self.market_id, type_) 86 key = "/cryptoportfolio/{}/latest/{}".format(self.market_id, type_)
87 conn.set(key, log) 87 conn.set(key, log)
88 key = "/cryptoportfolio/{}/latest/date".format(self.market_id)
89 conn.set(key, date.isoformat())
88 except Exception as e: 90 except Exception as e:
89 print("impossible to store report to redis: {}; {}".format(e.__class__.__name__, e)) 91 print("impossible to store report to redis: {}; {}".format(e.__class__.__name__, e))
90 92
diff --git a/tests/test_market.py b/tests/test_market.py
index e3482b8..e0cf70a 100644
--- a/tests/test_market.py
+++ b/tests/test_market.py
@@ -550,6 +550,7 @@ class MarketTest(WebMockTestCase):
550 mock.call.set("/cryptoportfolio/1/latest/type1", "payload1"), 550 mock.call.set("/cryptoportfolio/1/latest/type1", "payload1"),
551 mock.call.set("/cryptoportfolio/1/2018-03-24T00:00:00/type2", "payload2", ex=31*24*60*60), 551 mock.call.set("/cryptoportfolio/1/2018-03-24T00:00:00/type2", "payload2", ex=31*24*60*60),
552 mock.call.set("/cryptoportfolio/1/latest/type2", "payload2"), 552 mock.call.set("/cryptoportfolio/1/latest/type2", "payload2"),
553 mock.call.set("/cryptoportfolio/1/latest/date", "2018-03-24T00:00:00"),
553 ]) 554 ])
554 555
555 connect_mock.reset_mock() 556 connect_mock.reset_mock()