From: robk-tahoe Date: Wed, 11 Jun 2008 22:19:17 +0000 (-0700) Subject: test_web: fix webapi test around redirection issues X-Git-Tag: allmydata-tahoe-1.2.0~93 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/frontends/%3C?a=commitdiff_plain;h=b803158de7440e4e22143c038cf6f5eb410ffb3e;p=tahoe-lafs%2Ftahoe-lafs.git test_web: fix webapi test around redirection issues this fixes the test_web test test_POST_upload_mutable which chdir's into a /foo subdirectory, but then later asserts that the web ui redirects the user back to /foo, which should really be /foo/ since it's a directory. --- diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index f5da33ed..a8d1b3e7 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -1146,7 +1146,7 @@ class Web(WebMixin, unittest.TestCase): # differently d.addCallback(lambda res: - self.GET(self.public_url + "/foo", + self.GET(self.public_url + "/foo/", followRedirect=True)) def _check_page(res): # TODO: assert more about the contents @@ -1174,7 +1174,7 @@ class Web(WebMixin, unittest.TestCase): when_done=formwhendone, followRedirect=False) d.addCallback(_parse_overwrite_form_and_submit) - d.addBoth(self.shouldRedirect, urllib.quote(self.public_url + "/foo")) + d.addBoth(self.shouldRedirect, urllib.quote(self.public_url + "/foo/")) d.addCallback(lambda res: self.failUnlessMutableChildContentsAre(fn, u"new.txt", EVEN_NEWER_CONTENTS))