Merge "Return NotImplemented at POST object"
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
from swift.common.http import HTTP_OK
|
from swift.common.http import HTTP_OK
|
||||||
|
|
||||||
from swift3.controllers.base import Controller
|
from swift3.controllers.base import Controller
|
||||||
from swift3.response import AccessDenied, HTTPOk
|
from swift3.response import HTTPOk, S3NotImplemented
|
||||||
from swift3.etree import Element, SubElement, tostring
|
from swift3.etree import Element, SubElement, tostring
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ class ObjectController(Controller):
|
|||||||
return resp
|
return resp
|
||||||
|
|
||||||
def POST(self, req):
|
def POST(self, req):
|
||||||
raise AccessDenied()
|
raise S3NotImplemented()
|
||||||
|
|
||||||
def DELETE(self, req):
|
def DELETE(self, req):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -278,6 +278,11 @@ class TestSwift3Obj(Swift3TestCase):
|
|||||||
self.assertEquals(headers['X-Copy-From'], '/some/source')
|
self.assertEquals(headers['X-Copy-From'], '/some/source')
|
||||||
self.assertEquals(headers['Content-Length'], '0')
|
self.assertEquals(headers['Content-Length'], '0')
|
||||||
|
|
||||||
|
@s3acl
|
||||||
|
def test_object_POST_error(self):
|
||||||
|
code = self._test_method_error('POST', '/bucket/object', None)
|
||||||
|
self.assertEquals(code, 'NotImplemented')
|
||||||
|
|
||||||
@s3acl
|
@s3acl
|
||||||
def test_object_DELETE_error(self):
|
def test_object_DELETE_error(self):
|
||||||
code = self._test_method_error('DELETE', '/bucket/object',
|
code = self._test_method_error('DELETE', '/bucket/object',
|
||||||
|
|||||||
Reference in New Issue
Block a user