From: Andrew Gaul Date: Fri, 22 Aug 2014 18:05:09 +0000 (-0700) Subject: Test delete object on non-existent bucket X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F17%2Fhead;p=s3-tests.git Test delete object on non-existent bucket --- diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 44db1f19..a28dbb25 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -2152,6 +2152,20 @@ def test_object_raw_get_bucket_gone(): 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(method='get') @attr(operation='deleted object')