-
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
Tests for get participants endpoint (fixes #104) #105
Tests for get participants endpoint (fixes #104) #105
Conversation
headers={'Authorization': 'Bearer {}'.format(access_token)} | ||
) | ||
response = rv.get_json() | ||
assert rv.status == "404 NOT FOUND" |
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.
Shouldn't that be 200 with 0 participants?
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.
In my opinion there should not occur a situation where there are 0 participants.
At the very beginning all Code of Poznań users should be added as participant and participants_list should return all of them.
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.
If you can do something with the application, someone will do that. ;-)
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.
It should be 200 OK
here. That's a bug in the application and I created a separate issue to solve that: #130
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.
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 issue, but pretty good work!
backend/tests/conftest.py
Outdated
|
||
@pytest.fixture | ||
def add_participants(app, _db): | ||
db = _db |
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.
Do not see a lot of reason for such assignment. Would say I'm fine with overwriting that symbol (just as def add_participants(app, db)
or calling it at the end as _db.session.commit()
.
@@ -0,0 +1,35 @@ | |||
import pytest |
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.
unused import
headers={'Authorization': 'Bearer {}'.format(access_token)} | ||
) | ||
response = rv.get_json() | ||
assert rv.status == "200 OK" |
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 check rv.status_code == HTTPStatus.200_OK
frontend/yarn.lock
Outdated
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-1.4.0.tgz#ad5446a319cf4b090d3e14f9c3ee2ac53d545415" | ||
integrity sha512-Q6b5VrkGIhPTN+r/uw6P5UTYVQy0h3d4vRW5363qHTgzQfyYQk8BDlJNCTJj0Zu/z3aBq79zbyF88jbLlV9vxQ== | ||
[email protected]: |
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.
change unconnected with a pull request.
No description provided.