Ejemplo n.º 1
0
 def test_get_no_key(self):
     c = SampleClass()
     memcached_instance = c.container.get('watson.cache.storage.Memory')
     assert not memcached_instance[
         'tests.watson.cache.support.SampleClass.tada']
     assert c.tada() == 'test'
     assert memcached_instance[
         'tests.watson.cache.support.SampleClass.tada'] == 'test'
Ejemplo n.º 2
0
 def test_get_no_key(self):
     c = SampleClass()
     memcached_instance = c.container.get('watson.cache.storage.Memory')
     assert not memcached_instance[
         'tests.watson.cache.support.SampleClass.tada']
     assert c.tada() == 'test'
     assert memcached_instance[
         'tests.watson.cache.support.SampleClass.tada'] == 'test'
Ejemplo n.º 3
0
 def test_get_key(self):
     c = SampleClass()
     memcached_instance = c.container.get('watson.cache.storage.Memory')
     assert not memcached_instance['some_key']
     assert c.run() == 'test'
     assert memcached_instance['some_key'] == 'test'