コード例 #1
0
 def test_kicked_key(self):
     store("corruptTest", "data/bigoldfile.dat", self.client)
     self.client.set("corruptTest_2", None)
     self.assertRaises(ValueError, retrieve, "corruptTest", self.client)
コード例 #2
0
 def test_changed_data(self):
     store("corruptTest", "data/bigoldfile.dat", self.client)
     self.client.set("corruptTest_2", "changed data here")
     self.assertRaises(ValueError, retrieve, "corruptTest", self.client)
コード例 #3
0
 def test_fail_double_store(self):
     store("doublefile", "data/doublefile.dat", self.client)
     self.assertRaises(ValueError, store, "doublefile",
                       "data/doublefile.dat", self.client)
コード例 #4
0
 def test_retrieve(self):
     store("getTest", "data/bigoldfile.dat", self.client)
     result = retrieve("getTest", self.client)
     self.assertNotEqual(result, ValueError)
     self.assertNotEqual(result, KeyError)
コード例 #5
0
 def test_store(self):
     result = store("bigoldfile", "data/bigoldfile.dat", self.client)
     self.assertTrue(result)