mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Use correct HTTP status code for bad content type
415 is the status code for ‘Unsupported media type’ https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415
This commit is contained in:
@@ -51,13 +51,13 @@ def test_valid_post_broadcast_returns_201(
|
||||
headers=[('Content-Type', 'application/json'), auth_header],
|
||||
)
|
||||
|
||||
assert response.status_code == 400
|
||||
assert response.status_code == 415
|
||||
assert json.loads(response.get_data(as_text=True)) == {
|
||||
'errors': [{
|
||||
'error': 'BadRequestError',
|
||||
'message': 'Content type application/json not supported'
|
||||
}],
|
||||
'status_code': 400,
|
||||
'status_code': 415,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user