From 73fb7715539a1d2adf60ccb161737f42a19b0612 Mon Sep 17 00:00:00 2001 From: Evgenii Gorinov Date: Mon, 31 Oct 2016 18:19:06 +0300 Subject: [PATCH] Fix If-Match test According to https://tools.ietf.org/html/rfc7232, If-Match field should looks like QUOTES ETag QUOTES. Signed-off-by: Evgenii Gorinov --- s3tests/functional/test_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 020cb96..a3bb456 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -2310,7 +2310,7 @@ def test_get_object_ifmatch_failed(): key = bucket.new_key('foo') key.set_contents_from_string('bar') - e = assert_raises(boto.exception.S3ResponseError, bucket.get_key, 'foo', headers={'If-Match': 'ABCORZ'}) + e = assert_raises(boto.exception.S3ResponseError, bucket.get_key, 'foo', headers={'If-Match': '"ABCORZ"'}) eq(e.status, 412) eq(e.reason, 'Precondition Failed')