Exemple #1
0
 def test_set_and_get_with_prefix_encoder(self):
     storage = StorageProxy({}, prefix='pre::', encoder=json)
     storage.set("theKey", "theValue")
     storage.set("theKey2", "theValue2")
     assert storage.get("theKey2") == "theValue2"
     assert storage.get("theKey") == "theValue"
     assert storage.get("noKey") == None
Exemple #2
0
 def test_set_and_get(self):
     storage = StorageProxy({})
     storage.set("theKey", "theValue")
     storage.set("theKey2", "theValue2")
     assert storage.get("theKey2") == "theValue2"
     assert storage.get("theKey") == "theValue"
     assert storage.get("noKey") == None
Exemple #3
0
 def test_set_and_get_with_prefix_encoder(self):
     storage = StorageProxy({}, prefix='pre::', encoder=json)
     storage.set("theKey", "theValue")
     storage.set("theKey2", "theValue2")
     assert storage.get("theKey2") == "theValue2"
     assert storage.get("theKey") == "theValue"
     assert storage.get("noKey") == None
Exemple #4
0
 def test_set_and_get(self):
     storage = StorageProxy({})
     storage.set("theKey", "theValue")
     storage.set("theKey2", "theValue2")
     assert storage.get("theKey2") == "theValue2"
     assert storage.get("theKey") == "theValue"
     assert storage.get("noKey") == None