Implemented object POST as COPY
This commit is contained in:
10 changed files with 312 additions and 101 deletions
@@ -668,7 +668,7 @@ class File(Base):
self.conn.make_request('POST', self.path, hdrs=headers, cfg=cfg)
if self.conn.response.status != 202:
if self.conn.response.status not in (201, 202):
raise ResponseError(self.conn.response)
return True
@@ -1032,7 +1032,7 @@ class TestFile(Base):
self.assert_(file.write())
self.assert_status(201)
self.assert_(file.sync_metadata())
self.assert_status(202)
self.assert_status((201, 202))
else:
self.assertRaises(ResponseError, file.write)
self.assert_status(400)
@@ -1245,7 +1245,7 @@ class TestFile(Base):
file.metadata = metadata
self.assert_(file.sync_metadata())
self.assert_status(202)
self.assert_status((201, 202))
file = self.env.container.file(file.name)
self.assert_(file.initialize())
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.