From bbaab3b38ec2ce5944239ffbe2dd53328df40fff Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 10 Nov 2022 22:20:40 -0800 Subject: [PATCH] Test form actions use prefix, refs #1883 --- tests/test_html.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_html.py b/tests/test_html.py index 7cfe9d907b..aec7e2f2a4 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -765,6 +765,8 @@ def test_base_url_config(app_client_base_url_prefix, path, use_prefix): path_to_get = "/prefix/" + path.lstrip("/") response = client.get(path_to_get) 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"]): if "href" in el.attrs: href = el["href"]