summaryrefslogtreecommitdiffstats
path: root/test/functional/test_object.py
diff options
context:
space:
mode:
authorvenkata edara <redara@redhat.com>2017-11-22 13:35:46 +0530
committerPrashanth Pai <ppai@redhat.com>2017-11-22 09:07:11 +0000
commit488744a005fb399af8d094ad7a62c1917410398c (patch)
tree714441b43e09061fc339cae6a68de5c26f0fdf52 /test/functional/test_object.py
parent8af00bf3fa5aa7cd29a53e5e43ea230c196d10b0 (diff)
Rebase to Swift 2.15.1 (pike)HEADmaster
Change-Id: I84ebb44c5c3cf2f80c50f2d4ae4bd92b619a4297 Signed-off-by: venkata edara <redara@redhat.com> Reviewed-on: https://review.gluster.org/18412 Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'test/functional/test_object.py')
-rwxr-xr-xtest/functional/test_object.py13
1 files changed, 13 insertions, 0 deletions
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'), '',