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
This commit is contained in:
Zooko O'Whielacronx 2011-06-11 09:37:41 -07:00
parent 06bf0360d6
commit be1ebde6e5
2 changed files with 3 additions and 3 deletions

View File

@ -1107,7 +1107,7 @@ class SystemTest(SystemTestMixin, RunBinTahoeMixin, unittest.TestCase):
d.addCallback(lambda res: getPage(base + public + "/subdir1")) d.addCallback(lambda res: getPage(base + public + "/subdir1"))
def _got_subdir1(page): def _got_subdir1(page):
# there ought to be an href for our file # there ought to be an href for our file
self.failUnless(("<td>%d</td>" % len(self.data)) in page) self.failUnlessIn('<td align="right">%d</td>' % len(self.data), page)
self.failUnless(">mydata567</a>" in page) self.failUnless(">mydata567</a>" in page)
d.addCallback(_got_subdir1) d.addCallback(_got_subdir1)
d.addCallback(self.log, "done with _got_subdir1") d.addCallback(self.log, "done with _got_subdir1")

View File

@ -1063,7 +1063,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi
r'\s+<td>', r'\s+<td>',
r'<a href="%s">bar.txt</a>' % bar_url, r'<a href="%s">bar.txt</a>' % bar_url,
r'</td>', r'</td>',
r'\s+<td>%d</td>' % len(self.BAR_CONTENTS), r'\s+<td align="right">%d</td>' % len(self.BAR_CONTENTS),
]) ])
self.failUnless(re.search(get_bar, res), res) self.failUnless(re.search(get_bar, res), res)
for line in res.split("\n"): for line in res.split("\n"):
@ -3725,7 +3725,7 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi
r'\s+<td>', r'\s+<td>',
r'<a href="[^"]+%s[^"]+">lonely</a>' % (urllib.quote(lonely_uri),), r'<a href="[^"]+%s[^"]+">lonely</a>' % (urllib.quote(lonely_uri),),
r'</td>', r'</td>',
r'\s+<td>%d</td>' % len("one"), r'\s+<td align="right">%d</td>' % len("one"),
]) ])
self.failUnless(re.search(get_lonely, res), res) self.failUnless(re.search(get_lonely, res), res)