def test_has_space_false(self): cache = Cache(5, 60.0) cache._items = { "k1": ["v1", 0.1], "k2": ["v2", 0.5], "k3": ["v3", 1.2], "k4": ["v4", 5.8], "k5": ["v5", 6.4] } self.assertFalse(cache.has_space())
def test_has_space_true(self): cache = Cache(5, 60.0) self.assertTrue(cache.has_space())