-
Notifications
You must be signed in to change notification settings - Fork 45
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
Added tests for delete participant endpoint (fixes #193) #194
Added tests for delete participant endpoint (fixes #193) #194
Conversation
stanislawK
commented
Oct 30, 2019
- make start
- make test
Can you, @stanislawK, merge back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor stuff, altough it's not crucial.
): | ||
"""Test get detais of non-existent participant""" | ||
rv = client.get( | ||
"""Test get and delete non-existent participant""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-existing
"""Test get participant details for not logged in user.""" | ||
@pytest.mark.parametrize("method", ["get", "delete"]) | ||
def test_get_delete_participant_unauthorized(client, add_participants, method): | ||
"""Test get and delete participant with not logged in user.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove get from all the scenarios and ensure that we have explicit one for testing get
method. Others will be eg.: "Test delete participant when user logged-in / logged-out".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make tests less readable, especially if we would merge #191. Following magul suggesion I introduced there logged in client fixture. So e.g. for testing get method I will have to inject two different test clients, which could be confussing.