mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 23:29:28 -05:00
test(s3): assert NoSuchTagSet after DeleteBucketTagging in the Python compat suite (#4687)
The test accepted any ClientError, so an access-denied or server error after DeleteBucketTagging also passed. GetBucketTagging now returns NoSuchTagSet for a bucket without tags, as AWS does, so assert that error code.
This commit is contained in:
1 parent
a247b68abb
commit
005ecb3b76
1 file changed
+3
-6
@@ -313,12 +313,9 @@ class TestS3BucketTagging:
|
||||
|
||||
s3_client.delete_bucket_tagging(Bucket=test_bucket)
|
||||
|
||||
# Either empty tags or NoSuchTagSet error
|
||||
try:
|
||||
response = s3_client.get_bucket_tagging(Bucket=test_bucket)
|
||||
assert len(response.get("TagSet", [])) == 0
|
||||
except ClientError:
|
||||
pass # NoSuchTagSet is also acceptable
|
||||
with pytest.raises(ClientError) as exc_info:
|
||||
s3_client.get_bucket_tagging(Bucket=test_bucket)
|
||||
assert exc_info.value.response["Error"]["Code"] == "NoSuchTagSet"
|
||||
|
||||
|
||||
class TestS3LargeObject:
|
||||
|
||||
Reference in new issue
Block a user