Test split into boto and boto3 part
This commit is contained in:
parent
f32db6e64a
commit
51d96ae8f3
@ -639,7 +639,7 @@ def test_delete_keys():
|
||||
|
||||
|
||||
@mock_s3_deprecated
|
||||
def test_delete_keys_with_invalid():
|
||||
def test_delete_keys_invalid():
|
||||
conn = boto.connect_s3('the_key', 'the_secret')
|
||||
bucket = conn.create_bucket('foobar')
|
||||
|
||||
@ -657,13 +657,14 @@ def test_delete_keys_with_invalid():
|
||||
keys.should.have.length_of(3)
|
||||
keys[0].name.should.equal('file1')
|
||||
|
||||
# empty keys and boto2 client
|
||||
# empty keys
|
||||
result = bucket.delete_keys([])
|
||||
|
||||
result.deleted.should.have.length_of(0)
|
||||
result.errors.should.have.length_of(0)
|
||||
|
||||
# empty keys and boto3 client
|
||||
@mock_s3
|
||||
def test_boto3_delete_empty_keys_list():
|
||||
with assert_raises(ClientError) as err:
|
||||
boto3.client('s3').delete_objects(Bucket='foobar', Delete={'Objects': []})
|
||||
assert err.exception.response["Error"]["Code"] == "MalformedXML"
|
||||
|
Loading…
x
Reference in New Issue
Block a user