From 74e0956621512ed2786c9a52f8b3d7a362db40eb Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 10 Oct 2017 13:48:51 -0400 Subject: [PATCH] expect 400 for missing sse headers Signed-off-by: Casey Bodley (cherry picked from commit 42debb8be7dcd76b81122ed4a9d4ba8d84ad27cb) --- s3tests/functional/test_s3.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 083d5ec..58a95a2 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -8127,9 +8127,9 @@ def test_encryption_key_no_sse_c(): } key = bucket.new_key('testobj') data = 'A'*100 - key.set_contents_from_string(data, headers=sse_client_headers) - rdata = key.get_contents_as_string() - eq(data, rdata) + e = assert_raises(boto.exception.S3ResponseError, + key.set_contents_from_string, data, headers=sse_client_headers) + eq(e.status, 400) def _multipart_upload_enc(bucket, s3_key_name, size, part_size=5*1024*1024, @@ -8475,9 +8475,9 @@ def test_sse_kms_not_declared(): } key = bucket.new_key('testobj') data = 'A'*100 - key.set_contents_from_string(data, headers=sse_kms_client_headers) - rdata = key.get_contents_as_string() - eq(data, rdata) + e = assert_raises(boto.exception.S3ResponseError, + key.set_contents_from_string, data, headers=sse_kms_client_headers) + eq(e.status, 400) @attr(resource='object')