From: kevan Date: Sun, 18 Sep 2011 00:35:33 +0000 (-0700) Subject: test/test_mutable: refactor publish surprise test into common test fixture, rewrite... X-Git-Url: https://git.rkrishnan.org/vdrive/rgr-080307.php?a=commitdiff_plain;h=19cf58f2aa2ad5a0233d11ef8198dc1221fd788c;p=tahoe-lafs%2Ftahoe-lafs.git test/test_mutable: refactor publish surprise test into common test fixture, rewrite test_publish_surprise to use test fixture --- diff --git a/src/allmydata/test/test_mutable.py b/src/allmydata/test/test_mutable.py index 2b119ee1..5a1534d6 100644 --- a/src/allmydata/test/test_mutable.py +++ b/src/allmydata/test/test_mutable.py @@ -2500,11 +2500,12 @@ class FirstServerGetsDeleted: return retval class Problems(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin): - def test_publish_surprise(self): - self.basedir = "mutable/Problems/test_publish_surprise" + def do_publish_surprise(self, version): + self.basedir = "mutable/Problems/test_publish_surprise_%s" % version self.set_up_grid() nm = self.g.clients[0].nodemaker - d = nm.create_mutable_file(MutableData("contents 1")) + d = nm.create_mutable_file(MutableData("contents 1"), + version=version) def _created(n): d = defer.succeed(None) d.addCallback(lambda res: n.get_servermap(MODE_WRITE)) @@ -2528,6 +2529,9 @@ class Problems(GridTestMixin, unittest.TestCase, testutil.ShouldFailMixin): d.addCallback(_created) return d + def test_publish_surprise(self): + return self.do_publish_surprise(SDMF_VERSION) + def test_retrieve_surprise(self): self.basedir = "mutable/Problems/test_retrieve_surprise" self.set_up_grid()