mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 13:33:09 +00:00
actually returns CREATED for new data
This commit is contained in:
parent
776ee5f91c
commit
949b09ce27
@ -58,7 +58,7 @@ class FakeWebTest(TestCase):
|
||||
@inlineCallbacks
|
||||
def do_test():
|
||||
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()
|
||||
self.assertTrue(cap.startswith("URI:CHK:"))
|
||||
|
@ -140,6 +140,7 @@ class _FakeTahoeUriHandler(Resource, object):
|
||||
|
||||
def render_PUT(self, request):
|
||||
data = request.content.read()
|
||||
request.setResponseCode(201) # real code does this for brand-new files
|
||||
return self.add_data("URI:CHK:", data)
|
||||
|
||||
def render_POST(self, request):
|
||||
|
Loading…
Reference in New Issue
Block a user