From: Zooko O'Whielacronx Date: Wed, 10 Aug 2011 17:21:39 +0000 (-0700) Subject: merge some minor conflicts in test code from the 393-2 branch and trunk X-Git-Tag: trac-5200~8 X-Git-Url: https://git.rkrishnan.org/specifications/%5B/%5D%20/%22doc.html/provisioning?a=commitdiff_plain;h=95a75515860c7a535e319511e159ed5c4d1cee4b;p=tahoe-lafs%2Ftahoe-lafs.git merge some minor conflicts in test code from the 393-2 branch and trunk --- diff --git a/src/allmydata/test/test_dirnode.py b/src/allmydata/test/test_dirnode.py index d6bbc4f0..5dcbc179 100644 --- a/src/allmydata/test/test_dirnode.py +++ b/src/allmydata/test/test_dirnode.py @@ -1,4 +1,3 @@ - import time import unicodedata from zope.interface import implements @@ -594,8 +593,12 @@ class Dirnode(GridTestMixin, unittest.TestCase, u"empty_litdir": (nm.create_from_cap(empty_litdir_uri), {}), u"tiny_litdir": (nm.create_from_cap(tiny_litdir_uri), {}), } - d = c.create_dirnode(kids) - + d = None + if mdmf: + d = c.create_dirnode(kids, version=MDMF_VERSION) + else: + d = c.create_dirnode(kids) + def _created(dn): self.failUnless(isinstance(dn, dirnode.DirectoryNode)) backing_node = dn._node @@ -613,8 +616,7 @@ class Dirnode(GridTestMixin, unittest.TestCase, rep = str(dn) self.failUnless("RW-MUT" in rep) return dn.list() - d.addCallback(_created) - + def _check_kids(children): self.failUnlessReallyEqual(set(children.keys()), set([one_nfc, u"two", u"mut", u"fut", u"fro", diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index f03313f7..109ebdc4 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -1,4 +1,3 @@ - import os.path, re, urllib, time import simplejson from StringIO import StringIO @@ -1370,7 +1369,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi self.failUnless(CSS_STYLE.search(res), res) d.addCallback(_check) return d - + def test_GET_FILEURL_uri_missing(self): d = self.GET(self.public_url + "/foo/missing?t=uri") d.addBoth(self.should404, "test_GET_FILEURL_uri_missing")