d.addCallback(lambda res: self.GET(public + "/subdir3/new.txt"))
d.addCallback(self.failUnlessEqual, "NEWER contents")
+ # check that the status page exists
+ d.addCallback(lambda res: self.GET("status"))
# TODO: mangle the second segment of a file, to test errors that
# occur after we've already sent some good data, which uses a
from twisted.internet import defer
from twisted.web import client, error, http
from twisted.python import failure, log
-from allmydata import interfaces, provisioning, uri, webish, upload
+from allmydata import interfaces, provisioning, uri, webish, upload, download
from allmydata.util import fileutil
from allmydata.test.common import NonGridDirectoryNode, FakeCHKFileNode, FakeMutableFileNode, create_chk_filenode
from allmydata.interfaces import IURI, INewDirectoryURI, IReadonlyNewDirectoryURI, IFileURI, IMutableFileURI, IMutableFileNode
d.addCallback(_got_data)
return d
+ def list_uploads(self):
+ return [upload.UploadStatus()]
+ def list_downloads(self):
+ return [download.DownloadStatus()]
+
class WebMixin(object):
def setUp(self):
d.addCallback(_check4)
return d
+ def test_status(self):
+ d = self.GET("/status")
+ def _check(res):
+ self.failUnless('Current Uploads and Downloads' in res)
+ d.addCallback(_check)
+ return d
+
def test_GET_FILEURL(self):
d = self.GET(self.public_url + "/foo/bar.txt")
d.addCallback(self.failUnlessIsBarDotTxt)