def test_decay(self): tvc = TimedCache(self.cache_secs) tvc.put(self.key, self.value) time.sleep(self.cache_secs + .1) self.assertIsNone(tvc.get(self.key))
def test_retrieve(self): tvc = TimedCache(self.cache_secs) tvc.put(self.key, self.value) self.assertTrue(tvc.get(self.key), self.value)