runnin_test_directory_xhtml.dpatch
authorfreestorm77 <freestorm77@gmail.com>
Tue, 22 Jun 2010 20:14:03 +0000 (13:14 -0700)
committerfreestorm77 <freestorm77@gmail.com>
Tue, 22 Jun 2010 20:14:03 +0000 (13:14 -0700)
Runnin test for diretory.xhtml top banner

src/allmydata/test/test_web.py

index c67e81cc1f0cd1a025b080a7724f5a2391c87408..41d50a23f34ce744f08a3fd613be6b6256b8e18a 100644 (file)
@@ -985,6 +985,13 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, unittest.TestCase):
         d.addBoth(self.should404, "test_GET_FILEURL_uri_missing")
         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):
         # the addSlash means we get a redirect here
         # from /uri/$URI/foo/ , we need ../../../ to get back to the root