mirror of
https://github.com/simonw/datasette.git
synced 2026-10-20 00:06:59 +02:00
Test query form action with base_url
This commit is contained in:
parent
b0da4f38ea
commit
6cd61bc064
1 changed files with 9 additions and 0 deletions
|
|
@ -10,3 +10,12 @@ async def test_ad_hoc_query_form_targets_query_route(ds_client):
|
|||
form = Soup(response.text, "html.parser").select_one("form.sql.core")
|
||||
assert form is not None
|
||||
assert form["action"] == "/fixtures/-/query"
|
||||
|
||||
|
||||
def test_ad_hoc_query_form_action_preserves_base_url(app_client_base_url_prefix):
|
||||
response = app_client_base_url_prefix.get("/prefix/fixtures/-/query?sql=select+1")
|
||||
assert response.status_code == 200
|
||||
|
||||
form = Soup(response.text, "html.parser").select_one("form.sql.core")
|
||||
assert form is not None
|
||||
assert form["action"] == "/prefix/fixtures/-/query"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue