Skip to content

Commit

Permalink
remove typo
Browse files Browse the repository at this point in the history
  • Loading branch information
cahytinne committed Sep 27, 2016
1 parent c3a2936 commit b6fc624
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pyramid_urireferencer/protected_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,20 @@ def advice(parent_object, *args, **kw):
response = Response()
response.status_code = 500
response_json = {
"message": "Unable to verify if the uri {0} is no longer being used.".format(uri),
"message": "Unable to verify the uri {0} is no longer being used.".format(uri),
"errors": [],
"registry_response": registery_response.to_json()
}
for app_response in registery_response.applications:
if not app_response.success:
response_json["errors"].append(
"{}: Could not verify if the uri is no longer being used.".format(app_response.uri))
"{}: Could not verify the uri is no longer being used.".format(app_response.uri))
response.json_body = response_json
response.content_type = 'application/json'
return response
else:
raise HTTPInternalServerError(
detail="Urireferencer: Unable to verify if the uri {0} is no longer being used. Could not verify with {1}".
detail="Urireferencer: Unable to verify the uri {0} is no longer being used. Could not verify with {1}".
format(uri, ', '.join([app_response.uri for app_response
in registery_response.applications if not app_response.success])))
return fn(parent_object, *args, **kw)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_protected_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ def test_protected_operation_500_json(self, is_referenced_mock):
res = dummy.protected_dummy()
self.assertEqual(500, res.status_code)
self.assertEqual(res.json_body["message"],
"Unable to verify if the uri https://id.erfgoed.net/resources/1 is no longer being used.")
"Unable to verify the uri https://id.erfgoed.net/resources/1 is no longer being used.")
self.assertListEqual(res.json_body["errors"],
["https://dev-app.onroerenderfgoed.be/: Could not verify if the uri is no longer being used."])
["https://dev-app.onroerenderfgoed.be/: Could not verify the uri is no longer being used."])
self.assertEqual("application/json", res.content_type)

is_referenced_call = is_referenced_mock.mock_calls[0]
Expand Down

0 comments on commit b6fc624

Please sign in to comment.