Fixed broken CSS on 404 page, closes #777

This commit is contained in:
Simon Willison 2020-06-08 17:35:23 -07:00
commit 647c5ff0f3
2 changed files with 22 additions and 1 deletions

View file

@ -965,6 +965,18 @@ def inner_html(soup):
return inner_html.strip()
@pytest.mark.parametrize("path", ["/404", "/fixtures/404"])
def test_404(app_client, path):
response = app_client.get(path)
assert 404 == response.status
assert (
'<link rel="stylesheet" href="/-/static/app.css?{}'.format(
app_client.ds.app_css_hash()
)
in response.text
)
@pytest.mark.parametrize(
"path,expected_redirect",
[("/fixtures/", "/fixtures"), ("/fixtures/simple_view/", "/fixtures/simple_view")],