self.failUnlessEqual(self._mutable_uri, newnode.get_uri())
d.addCallback(_got3)
+ # finally list the directory, since mutable files are displayed
+ # differently
+
+ d.addCallback(lambda res:
+ self.GET(self.public_url + "/foo",
+ followRedirect=True))
+ def _check_page(res):
+ # TODO: assert something about the contents
+ pass
+ d.addCallback(_check_page)
+
return d
def test_POST_upload_replace(self):
or IDirectoryNode.providedBy(target)
or IMutableFileNode.providedBy(target)), target
- if IFileNode.providedBy(target):
+ if IMutableFileNode.providedBy(target):
# file
# add the filename to the uri_link url
ctx.fillSlots("filename",
T.a(href=dlurl)[html.escape(name)])
- ctx.fillSlots("type", "FILE")
+ ctx.fillSlots("type", "SSK")
- ctx.fillSlots("size", target.get_size())
+ ctx.fillSlots("size", "?")
text_plain_link = uri_link + "?filename=foo.txt"
text_plain_tag = T.a(href=text_plain_link)["text/plain"]
- elif IMutableFileNode.providedBy(target):
+ elif IFileNode.providedBy(target):
# file
# add the filename to the uri_link url
ctx.fillSlots("filename",
T.a(href=dlurl)[html.escape(name)])
- ctx.fillSlots("type", "SSK")
+ ctx.fillSlots("type", "FILE")
- ctx.fillSlots("size", "?")
+ ctx.fillSlots("size", target.get_size())
text_plain_link = uri_link + "?filename=foo.txt"
text_plain_tag = T.a(href=text_plain_link)["text/plain"]
-
elif IDirectoryNode.providedBy(target):
# directory
subdir_url = urllib.quote(name)