runnin_test_directory_xhtml.dpatch

Runnin test for diretory.xhtml top banner
This commit is contained in:
freestorm77 2010-06-22 13:14:03 -07:00
parent b8df25a8d1
commit 0304918a77
1 changed files with 7 additions and 0 deletions

View File

@ -985,6 +985,13 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
d.addBoth(self.should404, "test_GET_FILEURL_uri_missing") d.addBoth(self.should404, "test_GET_FILEURL_uri_missing")
return d return d
def test_GET_DIRECTORY_html_banner(self):
d = self.GET(self.public_url + "/foo", followRedirect=True)
def _check(res):
self.failUnlessIn('<div class="toolbar-item"><a href="../../..">Return to Welcome page</a></div>',res)
d.addCallback(_check)
return d
def test_GET_DIRURL(self): def test_GET_DIRURL(self):
# the addSlash means we get a redirect here # the addSlash means we get a redirect here
# from /uri/$URI/foo/ , we need ../../../ to get back to the root # from /uri/$URI/foo/ , we need ../../../ to get back to the root