mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
rel=alternate JSON for queries and database pages, closes #1620
This commit is contained in:
parent
3ef47a0896
commit
b72b2423c7
7 changed files with 91 additions and 31 deletions
|
|
@ -364,3 +364,12 @@ def test_canned_write_custom_template(canned_write_client):
|
|||
in response.text
|
||||
)
|
||||
assert "!!!CUSTOM_UPDATE_NAME_TEMPLATE!!!" in response.text
|
||||
# And test for link rel=alternate while we're here:
|
||||
assert (
|
||||
'<link rel="alternate" type="application/json+datasette" href="http://localhost/data/update_name.json">'
|
||||
in response.text
|
||||
)
|
||||
assert (
|
||||
response.headers["link"]
|
||||
== 'http://localhost/data/update_name.json; rel="alternate"; type="application/json+datasette"'
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue