mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
trivial: whitespace
I ran emacs's "M-x whitespace-cleanup" on the files that Toby's recent patch had touched that had trailing whitespace on some lines.
This commit is contained in:
parent
9247dc70e5
commit
ce7c448bc0
@ -14,19 +14,19 @@ class TestCase(SystemTestMixin, unittest.TestCase):
|
||||
self.ambientUploadAuthority = ambientUploadAuthority
|
||||
|
||||
def _test_ambient_upload_authority(self):
|
||||
self.webip = "127.0.0.1"
|
||||
self.webip = "127.0.0.1"
|
||||
self.webport = 3456
|
||||
self.basedir = self.mktemp()
|
||||
|
||||
# set up an introducer and a node
|
||||
d = self.set_up_nodes(1)
|
||||
d.addCallback(self._test_ambient_upload_authority2)
|
||||
d.addCallback(self._test_ambient_upload_authority2)
|
||||
d.addErrback(self.fail)
|
||||
return d
|
||||
|
||||
def _set_up_nodes_extra_config(self):
|
||||
# we need to remove the 'webport' old-style config file
|
||||
# or else the node won't start
|
||||
# or else the node won't start
|
||||
os.remove(os.path.join(self.getdir("client0"), "webport"))
|
||||
f = open(os.path.join(self.getdir("client0"), "tahoe.cfg"), "wt")
|
||||
f.write("\n")
|
||||
@ -41,8 +41,8 @@ class TestCase(SystemTestMixin, unittest.TestCase):
|
||||
f.write("enabled = true\n")
|
||||
f.write("\n")
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
|
||||
def _test_ambient_upload_authority2(self, ignored=None):
|
||||
content_type = 'multipart/form-data; boundary=----------ThIs_Is_tHe_bouNdaRY_$'
|
||||
body = '------------ThIs_Is_tHe_bouNdaRY_$\r\nContent-Disposition: form-data; name="t"\r\n\r\nupload\r\n------------ThIs_Is_tHe_bouNdaRY_$\r\nContent-Disposition: form-data; name="file"; filename="file1.txt"\r\nContent-Type: application/octet-stream\r\n\r\nsome test text\r\n------------ThIs_Is_tHe_bouNdaRY_$--\r\n'
|
||||
@ -60,7 +60,7 @@ class TestCase(SystemTestMixin, unittest.TestCase):
|
||||
f.deferred.addErrback(self._cbCheckResponse,[f,expected])
|
||||
deferreds.append(f.deferred)
|
||||
reactor.connectTCP(self.webip, self.webport, f)
|
||||
|
||||
|
||||
tryRequest("uri","PUT","non contents\r\n")
|
||||
tryRequest("uri?t=mkdir","PUT")
|
||||
tryRequest("uri?t=mkdir","POST")
|
||||
@ -77,8 +77,8 @@ class TestCase(SystemTestMixin, unittest.TestCase):
|
||||
r = cmp[0]
|
||||
expected = cmp[1]
|
||||
self.failUnless(int(r.status) == expected)
|
||||
|
||||
|
||||
|
||||
|
||||
class TestAmbientUploadAuthorityEnabled(TestCase):
|
||||
def setUp(self):
|
||||
TestCase.setUp(self)
|
||||
@ -94,4 +94,3 @@ class TestAmbientUploadAuthorityDisabled(TestCase):
|
||||
|
||||
def test_ambient_upload_authority_disabled(self):
|
||||
return self._test_ambient_upload_authority()
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import time
|
||||
|
||||
from twisted.internet import address
|
||||
@ -22,7 +21,7 @@ from allmydata.web.common import abbreviate_size, IClient, \
|
||||
class URIHandler(RenderMixin, rend.Page):
|
||||
# I live at /uri . There are several operations defined on /uri itself,
|
||||
# mostly involved with creation of unlinked files and directories.
|
||||
|
||||
|
||||
def setAmbientUploadAuthority(self, ambientUploadAuthority):
|
||||
self.ambientUploadAuthority = ambientUploadAuthority
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import time
|
||||
from twisted.application import service, strports, internet
|
||||
from twisted.web import http
|
||||
@ -123,7 +122,7 @@ class WebishServer(service.MultiService):
|
||||
name = "webish"
|
||||
root_class = root.Root
|
||||
|
||||
def __init__(self, webport, nodeurl_path=None, staticdir=None,
|
||||
def __init__(self, webport, nodeurl_path=None, staticdir=None,
|
||||
ambientUploadAuthority=False):
|
||||
service.MultiService.__init__(self)
|
||||
self.webport = webport
|
||||
|
Loading…
Reference in New Issue
Block a user