From: Zooko O'Whielacronx Date: Sat, 11 Jun 2011 16:37:41 +0000 (-0700) Subject: tests: fix tests to accomodate [20110611153758-92b7f-0ba5e4726fb6318dac28fb762a6512a0... X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=be1ebde6e5db1faeb8833b707da0f25f26b0a0b2;p=tahoe-lafs%2Ftahoe-lafs.git tests: fix tests to accomodate [20110611153758-92b7f-0ba5e4726fb6318dac28fb762a6512a003f4c430] Apparently none of the two authors (stercor, terrell), three reviewers (warner, davidsarah, terrell), or one committer (me) actually ran the tests. This is presumably due to #20. fixes #1412 --- diff --git a/src/allmydata/test/test_system.py b/src/allmydata/test/test_system.py index e37f6638..51ce3f62 100644 --- a/src/allmydata/test/test_system.py +++ b/src/allmydata/test/test_system.py @@ -1107,7 +1107,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase): d.addCallback(lambda res: getPage(base + public + "/subdir1")) def _got_subdir1(page): # there ought to be an href for our file - self.failUnless(("%d" % len(self.data)) in page) + self.failUnlessIn('%d' % len(self.data), page) self.failUnless(">mydata567" in page) d.addCallback(_got_subdir1) d.addCallback(self.log, "done with _got_subdir1") diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index 615429cb..915cba8a 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -1063,7 +1063,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi r'\s+', r'bar.txt' % bar_url, r'', - r'\s+%d' % len(self.BAR_CONTENTS), + r'\s+%d' % len(self.BAR_CONTENTS), ]) self.failUnless(re.search(get_bar, res), res) for line in res.split("\n"): @@ -3725,7 +3725,7 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi r'\s+', r'lonely' % (urllib.quote(lonely_uri),), r'', - r'\s+%d' % len("one"), + r'\s+%d' % len("one"), ]) self.failUnless(re.search(get_lonely, res), res)