Merge pull request #17 from andrewgaul/delete-object-non-existent-bucket

Test delete object on non-existent bucket
This commit is contained in:
Alfredo Deza 2014-12-04 09:37:11 -05:00
commit 7b5a61fa7f

View file

@ -2153,6 +2153,20 @@ def test_object_raw_get_bucket_gone():
eq(res.reason, 'Not Found') eq(res.reason, 'Not Found')
@attr(resource='object')
@attr(method='delete')
@attr(operation='deleted object and bucket')
@attr(assertion='fails 404')
def test_object_delete_key_bucket_gone():
(bucket, key) = _setup_request()
key.delete()
bucket.delete()
e = assert_raises(boto.exception.S3ResponseError, key.delete)
eq(e.status, 404)
eq(e.reason, 'Not Found')
eq(e.error_code, 'NoSuchBucket')
@attr(resource='object') @attr(resource='object')
@attr(method='get') @attr(method='get')
@attr(operation='deleted object') @attr(operation='deleted object')