Adding route tests

Removing status code from 404 title

Removing status code from 503 title

Adding id to 503 error box

Indatation fix
This commit is contained in:
Marcus Andersson 2021-05-13 22:02:50 +02:00 committed by Kevin Morris
parent f6744d3e39
commit 1d5827007f
5 changed files with 21 additions and 11 deletions

View file

@ -67,3 +67,10 @@ def test_language_query_params():
response = req.post("/language", data=post_data)
assert response.headers.get("location") == f"/?{q}"
assert response.status_code == int(HTTPStatus.SEE_OTHER)
def test_error_messages():
response1 = client.get("/thisroutedoesnotexist")
response2 = client.get("/raisefivethree")
assert response1.status_code == int(HTTPStatus.NOT_FOUND)
assert response2.status_code == int(HTTPStatus.SERVICE_UNAVAILABLE)