Replies: 3 comments 4 replies
-
When I have it on the default settings, I get the following:
I added a print statement here: @pytest.fixture(scope="module")
def superuser_token_headers(client: TestClient) -> dict[str, str]:
print(get_superuser_token_headers(client))
return get_superuser_token_headers(client) and added
After changing password to
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Appears that this is the problem: def test_reset_password(
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
token = generate_password_reset_token(email=settings.FIRST_SUPERUSER)
data = {"new_password": "changethis", "token": token}
r = client.post(
f"{settings.API_V1_STR}/reset-password/",
headers=superuser_token_headers,
json=data,
)
assert r.status_code == 200
assert r.json() == {"message": "Password updated successfully"} If you change this to : def test_reset_password(
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
token = generate_password_reset_token(email=settings.FIRST_SUPERUSER)
data = {"new_password": settings.FIRST_SUPERUSER_PASSWORD, "token": token}
r = client.post(
f"{settings.API_V1_STR}/reset-password/",
headers=superuser_token_headers,
json=data,
)
assert r.status_code == 200
assert r.json() == {"message": "Password updated successfully"} all tests succeed. |
Beta Was this translation helpful? Give feedback.
4 replies
-
Added PR here: #1213 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First Check
Commit to Help
Example Code
Description
Used copier to template the repo. When I do this, the users tests fail.
The
.env
has this for default:mine was changed to this:
And I get the following errors:
When I revert back to the default values above, they all pass.
Operating System
macOS
Operating System Details
I am using docker compose for this.
Python Version
3.12
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions