From 488744a005fb399af8d094ad7a62c1917410398c Mon Sep 17 00:00:00 2001 From: venkata edara Date: Wed, 22 Nov 2017 13:35:46 +0530 Subject: Rebase to Swift 2.15.1 (pike) Change-Id: I84ebb44c5c3cf2f80c50f2d4ae4bd92b619a4297 Signed-off-by: venkata edara Reviewed-on: https://review.gluster.org/18412 Reviewed-by: Prashanth Pai Tested-by: Prashanth Pai --- test/functional/test_object.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/functional/test_object.py') diff --git a/test/functional/test_object.py b/test/functional/test_object.py index f23ccbc..f6c8266 100755 --- a/test/functional/test_object.py +++ b/test/functional/test_object.py @@ -273,6 +273,12 @@ class TestObject(unittest2.TestCase): }) def test_if_none_match(self): + def delete(url, token, parsed, conn): + conn.request('DELETE', '%s/%s/%s' % ( + parsed.path, self.container, 'if_none_match_test'), '', + {'X-Auth-Token': token}) + return check_response(conn) + def put(url, token, parsed, conn): conn.request('PUT', '%s/%s/%s' % ( parsed.path, self.container, 'if_none_match_test'), '', @@ -287,6 +293,13 @@ class TestObject(unittest2.TestCase): resp.read() self.assertEqual(resp.status, 412) + resp = retry(delete) + resp.read() + self.assertEqual(resp.status, 204) + resp = retry(put) + resp.read() + self.assertEqual(resp.status, 201) + def put(url, token, parsed, conn): conn.request('PUT', '%s/%s/%s' % ( parsed.path, self.container, 'if_none_match_test'), '', -- cgit