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

Tests for get participants endpoint (fixes #104) #105

Conversation

stanislawK
Copy link
Contributor

No description provided.

headers={'Authorization': 'Bearer {}'.format(access_token)}
)
response = rv.get_json()
assert rv.status == "404 NOT FOUND"
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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. ;-)

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

As it was error in my endpoint (get participants list), I corrected ParticipantsList endpoint:
pull request #139: changed response and http code (fixes #130)

@OtisRed OtisRed requested a review from jacekkalbarczyk July 17, 2019 17:45
Copy link
Member

@magul magul left a 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!


@pytest.fixture
def add_participants(app, _db):
db = _db
Copy link
Member

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
Copy link
Member

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"
Copy link
Member

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

version "1.4.0"
resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-1.4.0.tgz#ad5446a319cf4b090d3e14f9c3ee2ac53d545415"
integrity sha512-Q6b5VrkGIhPTN+r/uw6P5UTYVQy0h3d4vRW5363qHTgzQfyYQk8BDlJNCTJj0Zu/z3aBq79zbyF88jbLlV9vxQ==
[email protected]:
Copy link
Member

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.

@magul magul changed the title Tests for get participants endpoint (fixes#104) Tests for get participants endpoint (fixes #104) Jul 22, 2019
@w1stler w1stler merged commit a79292d into CodeForPoznan:master Aug 7, 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.

4 participants