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