예제 #1
0
 def test_has_key_false(self):
     cache = Cache(5, 60.0)
     self.assertFalse(cache.has("k2"))
예제 #2
0
 def test_has_key_true(self):
     cache = Cache(5, 60.0)
     cache._items = {"k1": ["data", 0.1]}
     self.assertTrue(cache.has("k1"))