Remove JSON rel=alternate from some pages, closes #1623

This commit is contained in:
Simon Willison 2022-02-02 13:48:52 -08:00
commit 23a09b0f6a
2 changed files with 18 additions and 0 deletions

View file

@ -922,3 +922,15 @@ def test_alternate_url_json(app_client, path, expected):
)
in response.text
)
@pytest.mark.parametrize(
"path",
("/-/patterns", "/-/messages", "/-/allow-debug", "/fixtures.db"),
)
def test_no_alternate_url_json(app_client, path):
response = app_client.get(path)
assert "link" not in response.headers
assert (
'<link rel="alternate" type="application/json+datasette"' not in response.text
)