replace pdbs with NotImplemented
This commit is contained in:
parent
1b3eca72b0
commit
757c45c659
@ -44,7 +44,7 @@ def bucket_response(uri, body, headers):
|
||||
template = Template(S3_DELETE_BUCKET_WITH_ITEMS_ERROR)
|
||||
return template.render(bucket=removed_bucket), dict(status=409)
|
||||
else:
|
||||
import pdb;pdb.set_trace()
|
||||
raise NotImplementedError("Method {} has not been impelemented in the S3 backend yet".format(method))
|
||||
|
||||
|
||||
def key_response(uri_info, body, headers):
|
||||
@ -85,7 +85,7 @@ def key_response(uri_info, body, headers):
|
||||
template = Template(S3_DELETE_OBJECT_SUCCESS)
|
||||
return template.render(bucket=removed_key), dict(status=204)
|
||||
else:
|
||||
import pdb;pdb.set_trace()
|
||||
raise NotImplementedError("Method {} has not been impelemented in the S3 backend yet".format(method))
|
||||
|
||||
|
||||
S3_ALL_BUCKETS = """<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01">
|
||||
|
@ -5,4 +5,5 @@ freezegun
|
||||
Jinja2
|
||||
mock
|
||||
nose
|
||||
requests
|
||||
sure
|
@ -1,6 +1,7 @@
|
||||
import boto
|
||||
from boto.exception import S3ResponseError
|
||||
from boto.s3.key import Key
|
||||
import requests
|
||||
|
||||
import sure
|
||||
|
||||
@ -90,3 +91,13 @@ def test_get_all_buckets():
|
||||
buckets = conn.get_all_buckets()
|
||||
|
||||
buckets.should.have.length_of(2)
|
||||
|
||||
|
||||
@mock_s3
|
||||
def test_bucket_method_not_implemented():
|
||||
requests.post.when.called_with("https://foobar.s3.amazonaws.com/").should.throw(NotImplementedError)
|
||||
|
||||
|
||||
@mock_s3
|
||||
def test_key_method_not_implemented():
|
||||
requests.post.when.called_with("https://foobar.s3.amazonaws.com/foo").should.throw(NotImplementedError)
|
||||
|
Loading…
Reference in New Issue
Block a user