MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / test_expired_key

Method test_expired_key

test/test_redis_cache.py:42–45  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

40 self.assertEqual(self.redis_cache.get('key'), 'value')
41
42 def test_expired_key(self):
43 self.redis_cache.set('key', 'value', 1)
44 time.sleep(2) # wait for the key to expire
45 self.assertIsNone(self.redis_cache.get('key'))
46
47 def test_keys(self):
48 self.redis_cache.set('key1', 'value1', 10)

Callers

nothing calls this directly

Calls 2

setMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected