Change to test_s3 method test_presigned_url_restrict_parameters to tolerate change in exception messages, spurred by boto3 1.14.59 release. (#3308)

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
This commit is contained in:
jweite 2020-09-11 06:17:36 -04:00 committed by GitHub
parent c2d1ce2c14
commit 9f0f230d13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4769,8 +4769,8 @@ def test_presigned_url_restrict_parameters():
ClientMethod="put_object",
Params={"Bucket": bucket, "Key": key, "Unknown": "metadata"},
)
assert str(err.exception).should.equal(
'Parameter validation failed:\nUnknown parameter in input: "Unknown", must be one of: ACL, Body, Bucket, CacheControl, ContentDisposition, ContentEncoding, ContentLanguage, ContentLength, ContentMD5, ContentType, Expires, GrantFullControl, GrantRead, GrantReadACP, GrantWriteACP, Key, Metadata, ServerSideEncryption, StorageClass, WebsiteRedirectLocation, SSECustomerAlgorithm, SSECustomerKey, SSECustomerKeyMD5, SSEKMSKeyId, SSEKMSEncryptionContext, RequestPayer, Tagging, ObjectLockMode, ObjectLockRetainUntilDate, ObjectLockLegalHoldStatus'
assert str(err.exception).should.match(
r'Parameter validation failed:\nUnknown parameter in input: "Unknown", must be one of:.*'
)
s3.delete_bucket(Bucket=bucket)