mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fixed broken CSS on 404 page, closes #777
This commit is contained in:
parent
49d6d2f7b0
commit
647c5ff0f3
2 changed files with 22 additions and 1 deletions
|
|
@ -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")],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue