raise 404 when unknown url

consistent with other endpoints.

also refactor of notification_schema to separate some fns to a different file
This commit is contained in:
Leo Hemsted
2017-07-20 15:23:46 +01:00
parent 9caf45451e
commit 79e33073c9
5 changed files with 55 additions and 56 deletions

View File

@@ -442,8 +442,6 @@ def test_post_notification_raises_bad_request_if_not_valid_notification_type(cli
data='{}',
headers=[('Content-Type', 'application/json'), auth_header]
)
assert response.status_code == 400
assert response.status_code == 404
error_json = json.loads(response.get_data(as_text=True))
assert error_json['errors'] == [
{'error': 'BadRequestError', 'message': 'Unknown notification type foo'}
]
assert 'The requested URL was not found on the server.' in error_json['message']