Skip to content

Additional tests for login endpoint (fixes #199) #200

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

Merged
merged 1 commit into from
Nov 9, 2019

Conversation

stanislawK
Copy link
Contributor

No description provided.

)

response = rv.get_json()
assert rv.status_code == HTTPStatus.UNAUTHORIZED
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going probably to merge this pull request as tests are passing but I would propose to consider if that's the best status code semantically speaking.

What do you think about 403 FORBIDDEN as user is authorized to the system but forbidden to use this particular resource twice? We can also send more generic 400 BAD REQUEST or even 200 OK with proper authorization secrets as that doesn't look like a big deal here).

@magul magul merged commit 67f27e7 into CodeForPoznan:master Nov 9, 2019
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.

2 participants