示例#1
0
 def test_expired(self):
     with raises(NotImplementedError):
         bs = BaseStorage()
         bs.expired('some_key')
示例#2
0
 def test_get_default(self):
     with raises(NotImplementedError):
         bs = BaseStorage()
         bs.get('test')
示例#3
0
 def test_flush(self):
     with raises(NotImplementedError):
         bs = BaseStorage()
         bs.flush()
示例#4
0
 def test_create(self):
     bs = BaseStorage()
     assert repr(bs) == '<watson.cache.storage.BaseStorage>'
示例#5
0
 def test_set_params(self):
     with raises(NotImplementedError):
         bs = BaseStorage()
         bs.set('test', 'test', timeout=3600)
示例#6
0
 def test_flush(self):
     bs = BaseStorage()
     bs.flush()
示例#7
0
 def test_expired(self):
     bs = BaseStorage()
     bs.expired('some_key')
示例#8
0
 def test_delete(self):
     bs = BaseStorage()
     del bs['test']
示例#9
0
 def test_contains(self):
     bs = BaseStorage()
     'test' in bs
示例#10
0
 def test_get(self):
     bs = BaseStorage()
     bs['test']
示例#11
0
 def test_get_default(self):
     bs = BaseStorage()
     bs.get('test')
示例#12
0
 def test_set_params(self):
     bs = BaseStorage()
     bs.set('test', 'test', timeout=3600)
示例#13
0
 def test_expired(self):
     bs = BaseStorage()
     bs.expired('some_key')
示例#14
0
 def test_flush(self):
     bs = BaseStorage()
     bs.flush()
示例#15
0
 def test_get_default(self):
     bs = BaseStorage()
     bs.get('test')
示例#16
0
 def test_set_params(self):
     bs = BaseStorage()
     bs.set('test', 'test', timeout=3600)