diff options
Diffstat (limited to 'test/functional/test_object.py')
-rwxr-xr-x | test/functional/test_object.py | 13 |
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'), '', |