示例#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']