Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add Missing logout in signup tests to reset user session #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

javsanmar5
Copy link

In the auth module unit tests, there is an issue in the signup tests where the user session is not reset after successfully signing up, which causes unexpected behavior in subsequent tests. This happens because, during a successful signup, the login_user() function is called, leaving the user logged in. However, unlike the login tests, there is no logout action to clear the session after each signup test.
I added a test_client.get("/logout", follow_redirects=True) call after the assertions in the signup tests, ensuring that each following test starts with an unauthenticated session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant