Skip to content

Commit 8530bd9

Browse files
authored
Fix test failed after test_reset_password if user use own password
If use set his own password of FIRST_SUPERUSER_PASSWORD in .env file, after run test_reset_password case, the password will be changed to "changethis" becasue it hardcorded in this testcase. Following testcases will all be failed because of wrong password. Change it to reset to password in .env file.
1 parent f178e58 commit 8530bd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/tests/api/routes/test_login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_reset_password(
7373
client: TestClient, superuser_token_headers: dict[str, str], db: Session
7474
) -> None:
7575
token = generate_password_reset_token(email=settings.FIRST_SUPERUSER)
76-
data = {"new_password": "changethis", "token": token}
76+
data = {"new_password": settings.FIRST_SUPERUSER_PASSWORD, "token": token}
7777
r = client.post(
7878
f"{settings.API_V1_STR}/reset-password/",
7979
headers=superuser_token_headers,

0 commit comments

Comments
 (0)