| 9 | |
| 10 | |
| 11 | class TestRedisCache: |
| 12 | def setup_method(self): |
| 13 | self.conn = Mock() |
| 14 | self.cache = RedisCache(self.conn) |
| 15 | |
| 16 | def test_set_expiration_datetime(self): |
| 17 | self.cache.set("foo", "bar", expires=datetime(2014, 2, 2)) |
| 18 | assert self.conn.setex.called |
| 19 | |
| 20 | def test_set_expiration_datetime_aware(self): |
| 21 | self.cache.set("foo", "bar", expires=datetime(2014, 2, 2, tzinfo=timezone.utc)) |
| 22 | assert self.conn.setex.called |
| 23 | |
| 24 | def test_set_expiration_int(self): |
| 25 | self.cache.set("foo", "bar", expires=600) |
| 26 | assert self.conn.setex.called |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…