mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-22 04:18:23 +00:00
actually returns CREATED for new data
This commit is contained in:
parent
b01995f158
commit
683c8d3e4f
@ -58,7 +58,7 @@ class FakeWebTest(TestCase):
|
|||||||
@inlineCallbacks
|
@inlineCallbacks
|
||||||
def do_test():
|
def do_test():
|
||||||
resp = yield self.http_client.put("http://example.com/uri", content)
|
resp = yield self.http_client.put("http://example.com/uri", content)
|
||||||
self.assertEqual(resp.code, 200)
|
self.assertEqual(resp.code, 201)
|
||||||
|
|
||||||
cap = yield resp.content()
|
cap = yield resp.content()
|
||||||
self.assertTrue(cap.startswith("URI:CHK:"))
|
self.assertTrue(cap.startswith("URI:CHK:"))
|
||||||
|
@ -140,6 +140,7 @@ class _FakeTahoeUriHandler(Resource, object):
|
|||||||
|
|
||||||
def render_PUT(self, request):
|
def render_PUT(self, request):
|
||||||
data = request.content.read()
|
data = request.content.read()
|
||||||
|
request.setResponseCode(201) # real code does this for brand-new files
|
||||||
return self.add_data("URI:CHK:", data)
|
return self.add_data("URI:CHK:", data)
|
||||||
|
|
||||||
def render_POST(self, request):
|
def render_POST(self, request):
|
||||||
|
Loading…
Reference in New Issue
Block a user