Open ionelmc opened 4 years ago
I'm having the same problem. So far, I am changing the form action manually in the tests, like
response = test_app.get("/base_url")
form = response.form
form.action = "/base_url"
form_response = form.submit()
which also works if the URL is dynamic (e.g., it depends on an object's id):
form.action = f"/base_url/{object.id}"
form_response = form.submit()
It is annoying, but at least it works without having to change the template.
Eg, a form like:
would get parsed out as a form with "/" as action url but instead the current url should be the action url. as per the html5 spec at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm