예제 #1
0
 def test_expired(self):
     cache = Memory()
     cache.set('test', 'value', -1)
     assert cache.expired('test')
예제 #2
0
 def test_expired(self):
     cache = Memory()
     cache.set('test', 'value', -1)
     assert cache.expired('test')
예제 #3
0
 def test_set(self):
     cache = Memory()
     cache['test'] = 'test'
     cache.set('expired', 'value', -1)
     assert cache['test'] == 'test'
     assert not cache['expired']
예제 #4
0
 def test_set(self):
     cache = Memory()
     cache['test'] = 'test'
     cache.set('expired', 'value', -1)
     assert cache['test'] == 'test'
     assert not cache['expired']