Consistently return charset utf-8, closes #752

This commit is contained in:
Simon Willison 2020-05-04 10:41:58 -07:00
commit 9424687e9e
4 changed files with 19 additions and 9 deletions

View file

@ -963,6 +963,12 @@ def test_404_trailing_slash_redirect(app_client, path, expected_redirect):
assert expected_redirect == response.headers["Location"]
def test_404_content_type(app_client):
response = app_client.get("/404")
assert 404 == response.status
assert "text/html; charset=utf-8" == response.headers["content-type"]
def test_canned_query_with_custom_metadata(app_client):
response = app_client.get("/fixtures/neighborhood_search?text=town")
assert response.status == 200