Revised the log in process of the test site to return to the previous page after logging in.

This commit is contained in:
2023-04-11 22:05:57 +08:00
parent 12ccf658bf
commit fadd8e73b6
4 changed files with 15 additions and 6 deletions

View File

@@ -103,6 +103,7 @@ def get_client(app: Flask, username: str) -> tuple[httpx.Client, str]:
csrf_token: str = get_csrf_token(client)
response: httpx.Response = client.post("/login",
data={"csrf_token": csrf_token,
"next": "/",
"username": username})
assert response.status_code == 302
assert response.headers["Location"] == "/"