mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
Wire up error handlers.
Replace some 400s with more appropriate 500s. DAO methods that cause unexpected exceptions get caught and logged by errors.py 500 error handler.
This commit is contained in:
@@ -146,7 +146,7 @@ def test_post_service_without_users_attribute(notify_api, notify_db, notify_db_s
|
||||
url_for('service.create_service'),
|
||||
data=json.dumps(data),
|
||||
headers=headers)
|
||||
assert resp.status_code == 400
|
||||
assert resp.status_code == 500
|
||||
assert Service.query.count() == 0
|
||||
json_resp = json.loads(resp.get_data(as_text=True))
|
||||
assert json_resp['message'] == '{"users": ["Missing data for required attribute"]}'
|
||||
|
||||
Reference in New Issue
Block a user