mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Test form actions use prefix, refs #1883
This commit is contained in:
parent
867e0abd34
commit
bbaab3b38e
1 changed files with 2 additions and 0 deletions
|
|
@ -765,6 +765,8 @@ def test_base_url_config(app_client_base_url_prefix, path, use_prefix):
|
||||||
path_to_get = "/prefix/" + path.lstrip("/")
|
path_to_get = "/prefix/" + path.lstrip("/")
|
||||||
response = client.get(path_to_get)
|
response = client.get(path_to_get)
|
||||||
soup = Soup(response.body, "html.parser")
|
soup = Soup(response.body, "html.parser")
|
||||||
|
for form in soup.select("form"):
|
||||||
|
assert form["action"].startswith("/prefix")
|
||||||
for el in soup.findAll(["a", "link", "script"]):
|
for el in soup.findAll(["a", "link", "script"]):
|
||||||
if "href" in el.attrs:
|
if "href" in el.attrs:
|
||||||
href = el["href"]
|
href = el["href"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue