]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_storage: yet more coverage
authorBrian Warner <warner@allmydata.com>
Wed, 18 Jun 2008 00:44:10 +0000 (17:44 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 18 Jun 2008 00:44:10 +0000 (17:44 -0700)
src/allmydata/test/test_storage.py

index c517f5e20b3d18de823696f40818f0d132a2d814..fd1a6df5d0fa5065386ab5e807f826cb22f6d62a 100644 (file)
@@ -889,6 +889,16 @@ class MutableServer(unittest.TestCase):
         self.failUnlessEqual(read("si1", [0], [(0,100)]), {0: [data]})
         reset()
 
+        # finally, test some operators against empty shares
+        answer = write("si1", secrets, {1: ([(10, 5, "eq", "11112"),
+                                             ],
+                                            [(0, "x"*100)],
+                                            None,
+                                            )}, [(10,5)])
+        self.failUnlessEqual(answer, (False, {0: ["11111"]}))
+        self.failUnlessEqual(read("si1", [0], [(0,100)]), {0: [data]})
+        reset()
+
     def test_readv(self):
         ss = self.create("test_readv")
         secrets = ( self.write_enabler("we1"),