mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
parent
b72b2423c7
commit
8d5779acf0
10 changed files with 27 additions and 62 deletions
|
|
@ -875,12 +875,14 @@ def test_trace_correctly_escaped(app_client):
|
|||
@pytest.mark.parametrize(
|
||||
"path,expected",
|
||||
(
|
||||
# Instance index page
|
||||
("/", "http://localhost/.json"),
|
||||
# Table page
|
||||
("/fixtures/facetable", "http://localhost/fixtures/facetable.json"),
|
||||
(
|
||||
"/fixtures/table%2Fwith%2Fslashes.csv",
|
||||
"http://localhost/fixtures/table%2Fwith%2Fslashes.csv?_format=json",
|
||||
),
|
||||
("/fixtures/facetable", "http://localhost/fixtures/facetable.json"),
|
||||
# Row page
|
||||
(
|
||||
"/fixtures/no_primary_key/1",
|
||||
|
|
@ -901,6 +903,11 @@ def test_trace_correctly_escaped(app_client):
|
|||
"/fixtures/neighborhood_search?text=town",
|
||||
"http://localhost/fixtures/neighborhood_search.json?text=town",
|
||||
),
|
||||
# /-/ pages
|
||||
(
|
||||
"/-/plugins",
|
||||
"http://localhost/-/plugins.json",
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_alternate_url_json(app_client, path, expected):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue