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:
Chris Hill-Scott
2021-01-26 12:01:10 +00:00
parent b85fcafd46
commit 0398ac57f1
2 changed files with 3 additions and 3 deletions

View File

@@ -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,
}