diff --git a/designate/api/v2/controllers/pools.py b/designate/api/v2/controllers/pools.py index f7a0d1f13..37e6649c9 100644 --- a/designate/api/v2/controllers/pools.py +++ b/designate/api/v2/controllers/pools.py @@ -103,7 +103,7 @@ class PoolsController(rest.RestController): pool = self.central_api.update_pool(context, pool) - response.status_int = 200 + response.status_int = 202 return DesignateAdapter.render('API_v2', pool, request=request) diff --git a/designate/tests/test_api/test_v2/test_pools.py b/designate/tests/test_api/test_v2/test_pools.py index bcc10cbdf..ac8f2b992 100644 --- a/designate/tests/test_api/test_v2/test_pools.py +++ b/designate/tests/test_api/test_v2/test_pools.py @@ -176,10 +176,10 @@ class ApiV2PoolsTest(ApiV2TestCase): body = {'description': 'Tester'} url = '/pools/%s' % pool['id'] - response = self.client.patch_json(url, body, status=200) + response = self.client.patch_json(url, body, status=202) # Check the headers are what we expect - self.assertEqual(200, response.status_int) + self.assertEqual(202, response.status_int) self.assertEqual('application/json', response.content_type) # Check the body structure is what we expect @@ -217,10 +217,10 @@ class ApiV2PoolsTest(ApiV2TestCase): ]} url = '/pools/%s' % pool['id'] - response = self.client.patch_json(url, body, status=200) + response = self.client.patch_json(url, body, status=202) # Check the headers are what we expect - self.assertEqual(200, response.status_int) + self.assertEqual(202, response.status_int) self.assertEqual('application/json', response.content_type) # Check the body structure is what we expect @@ -241,10 +241,10 @@ class ApiV2PoolsTest(ApiV2TestCase): body = {"attributes": {"scope": "private"}} url = '/pools/%s' % pool['id'] - response = self.client.patch_json(url, body, status=200) + response = self.client.patch_json(url, body, status=202) # Check the headers are what we expect - self.assertEqual(200, response.status_int) + self.assertEqual(202, response.status_int) self.assertEqual('application/json', response.content_type) # Check the values returned are what we expect diff --git a/functionaltests/api/v2/test_pool.py b/functionaltests/api/v2/test_pool.py index bf5ffd787..6fa38b800 100644 --- a/functionaltests/api/v2/test_pool.py +++ b/functionaltests/api/v2/test_pool.py @@ -45,7 +45,7 @@ class PoolTest(DesignateV2Test): patch_model = datagen.random_pool_data() resp, new_model = PoolClient.as_user('admin').patch_pool( old_model.id, patch_model) - self.assertEqual(resp.status, 200) + self.assertEqual(resp.status, 202) resp, model = PoolClient.as_user('admin').get_pool(new_model.id) self.assertEqual(resp.status, 200)