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

307 Response code #7

Open
othodor opened this issue Feb 28, 2022 · 0 comments
Open

307 Response code #7

othodor opened this issue Feb 28, 2022 · 0 comments

Comments

@othodor
Copy link

othodor commented Feb 28, 2022

"/login", data={"username": test_user['email'], "password": test_user['password']})

I had to modify "/login" to "/login/" to get a 200 Http Response, otherwise you will be redirected and the assertion will raise an error.

        res = client.post("/login", data={"username": test_user['email'], "password": test_user['password']})
>       assert res.status_code == 200
E       assert 307 == 200
E         +307
E         -200

tests\test_users.py:92: AssertionError
================================================================== short test summary info ================================================================== 
FAILED tests/test_users.py::test_login - assert 307 == 200```



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

No branches or pull requests

1 participant