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

DRY the identity pick and validation – now without mocking #84

Closed

Conversation

Glutexo
Copy link
Collaborator

@Glutexo Glutexo commented Jan 4, 2019

Introduced a new custom Exception to DRY the identity pick and validation. If the header is missing, undecodeable or invalid, this new
Exception is raised. Aborting the request with a Forbidden status code is now unified in one place.

This is an alternative version of #76. The executive code is the same, but there is no mocking in the tests. Asking @dehort for a review. Pick any one you like better.

Introduced a new custom Exception to DRY the identity pick and
validation. If the header is missing, undecodable or invalid, this new
Exception is raised. Aborting the request with a Forbidden status code
is not unified in one place.
@Glutexo Glutexo force-pushed the dry_identity_without_mocking branch from 0aaf2b7 to 9ce7c41 Compare January 15, 2019 14:02
@Glutexo
Copy link
Collaborator Author

Glutexo commented Jan 16, 2019

Refactored and rebased tests for this one too. Hopefully, it won’t be necessary to have this fully merged since we have #76. But it will be worth it to pull some tests from here because they test the whole module and not just single tiny units.

@Glutexo
Copy link
Collaborator Author

Glutexo commented Jan 17, 2019

Closing this. I think that the authentication module is tested enough by the tests in test_api.py.

@Glutexo Glutexo closed this Jan 17, 2019
@Glutexo Glutexo deleted the dry_identity_without_mocking branch January 17, 2019 15:18
@Glutexo Glutexo restored the dry_identity_without_mocking branch January 17, 2019 15:19
@Glutexo Glutexo deleted the dry_identity_without_mocking branch April 16, 2019 11:44
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