]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
test_web.py: one more line of test coverage
authorBrian Warner <warner@allmydata.com>
Wed, 29 Oct 2008 05:00:15 +0000 (22:00 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 29 Oct 2008 05:00:15 +0000 (22:00 -0700)
src/allmydata/test/test_web.py

index 40f9e4020fdc8286e1e58de593e348107a67072d..0d80b52e67ce3a038ecb38e6ccdee0b24e418483 100644 (file)
@@ -2197,6 +2197,16 @@ class Web(WebMixin, testutil.StallMixin, unittest.TestCase):
         d.addCallback(_made_dir)
         return d
 
+    def test_PUT_DIRURL_bad_t(self):
+        d = self.shouldFail2(error.Error, "test_PUT_DIRURL_bad_t",
+                                 "400 Bad Request", "PUT to a directory",
+                                 self.PUT, self.public_url + "/foo?t=BOGUS", "")
+        d.addCallback(lambda res:
+                      self.failUnlessChildURIIs(self.public_root,
+                                                u"foo",
+                                                self._foo_uri))
+        return d
+
     def test_PUT_NEWFILEURL_uri(self):
         contents, n, new_uri = self.makefile(8)
         d = self.PUT(self.public_url + "/foo/new.txt?t=uri", new_uri)