mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Change endpoint responses where there are marshalling, unmarshalling
or param errors to raise invalid data exception. That will cause those responses to be handled in by errors.py, which will log the errors. Set most of schemas to strict mode so that marshmallow will raise exception rather than checking for errors in return tuple from load. Added handler to errors.py for marshmallow validation errors.
This commit is contained in:
@@ -296,7 +296,7 @@ def test_get_user_by_email_bad_url_returns_404(notify_api,
|
||||
assert resp.status_code == 400
|
||||
json_resp = json.loads(resp.get_data(as_text=True))
|
||||
assert json_resp['result'] == 'error'
|
||||
assert json_resp['message'] == 'invalid request'
|
||||
assert json_resp['message'] == 'Invalid request. Email query string param required'
|
||||
|
||||
|
||||
def test_get_user_with_permissions(notify_api,
|
||||
|
||||
Reference in New Issue
Block a user