]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
webish.py: test that _get_or_create_directories fix I made a few hours ago
authorBrian Warner <warner@lothar.com>
Sat, 14 Jul 2007 05:19:16 +0000 (22:19 -0700)
committerBrian Warner <warner@lothar.com>
Sat, 14 Jul 2007 05:19:16 +0000 (22:19 -0700)
src/allmydata/test/test_web.py
src/allmydata/webish.py

index c9ecfcb95f583eaae2a178681b3d1672e7202e62..ff450d7105574289f007aae46bbb2e1708b3f8e8 100644 (file)
@@ -700,11 +700,11 @@ class Web(unittest.TestCase):
         self.touch(localdir, "three/bar.txt")
         self.touch(localdir, "zap.zip")
 
-        d = self.PUT("/vdrive/global/foo/newdir?t=upload&localdir=%s"
+        d = self.PUT("/vdrive/global/newdir?t=upload&localdir=%s"
                      % localdir, "")
         def _check(res):
-            self.failUnless("newdir" in self._foo_node.children)
-            newnode = self.nodes[self._foo_node.children["newdir"]]
+            self.failUnless("newdir" in self.public_root.children)
+            newnode = self.nodes[self.public_root.children["newdir"]]
             self.failUnlessEqual(sorted(newnode.children.keys()),
                                  sorted(["one", "two", "three", "zap.zip"]))
             onenode = self.nodes[newnode.children["one"]]
index fc7bd4b1c883358c5af8fe24815c8dab5416fe67..7e6ddac4173c653b02eeeb90feaf4b4ff88a762e 100644 (file)
@@ -602,6 +602,7 @@ class PUTHandler(rend.Page):
             if localfile:
                 d.addCallback(self._upload_localfile, localfile, name)
             elif localdir:
+                # take the last step
                 d.addCallback(self._get_or_create_directories, self._path[-1:])
                 d.addCallback(self._upload_localdir, localdir)
             else: