Fix Storage Class error handling (#1653)

Added check for valid storage classes in set_key and copy_key
added unit test for standard storage and infrequent access
This commit is contained in:
Alec Rajeev 2018-06-07 03:09:36 -04:00 committed by Terry Cain
commit 6c10dc0403
3 changed files with 124 additions and 3 deletions

View file

@ -168,3 +168,13 @@ class InvalidNotificationEvent(S3ClientError):
"InvalidArgument",
"The event is not supported for notifications",
*args, **kwargs)
class InvalidStorageClass(S3ClientError):
code = 400
def __init__(self, *args, **kwargs):
super(InvalidStorageClass, self).__init__(
"InvalidStorageClass",
"The storage class you specified is not valid",
*args, **kwargs)