diff --git a/marconi/tests/transport/wsgi/test_claims.py b/marconi/tests/transport/wsgi/test_claims.py index 78069d0fa..33bf4cacd 100644 --- a/marconi/tests/transport/wsgi/test_claims.py +++ b/marconi/tests/transport/wsgi/test_claims.py @@ -86,7 +86,7 @@ class ClaimsBaseTest(base.TestBase): # First, claim some messages body = self.simulate_post(self.claims_path, self.project_id, body=doc) - self.assertEquals(self.srmock.status, falcon.HTTP_200) + self.assertEquals(self.srmock.status, falcon.HTTP_201) claimed = json.loads(body[0]) claim_href = self.srmock.headers_dict['Location'] diff --git a/marconi/transport/wsgi/claims.py b/marconi/transport/wsgi/claims.py index 979072108..ffac49764 100644 --- a/marconi/transport/wsgi/claims.py +++ b/marconi/transport/wsgi/claims.py @@ -88,7 +88,7 @@ class CollectionResource(object): resp.location = req.path + '/' + cid resp.body = helpers.to_json(resp_msgs) - resp.status = falcon.HTTP_200 + resp.status = falcon.HTTP_201 else: resp.status = falcon.HTTP_204 @@ -117,7 +117,7 @@ class ItemResource(object): meta['messages'] = list(msgs) except storage_exceptions.DoesNotExist: - raise falcon.HTTPNotFound + raise falcon.HTTPNotFound() except Exception as ex: LOG.exception(ex) description = _('Claim could not be queried.') @@ -163,7 +163,7 @@ class ItemResource(object): resp.status = falcon.HTTP_204 except storage_exceptions.DoesNotExist: - raise falcon.HTTPNotFound + raise falcon.HTTPNotFound() except Exception as ex: LOG.exception(ex) description = _('Claim could not be updated.')