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

[301] teams endpoints (fixes#301) #311

Merged
merged 6 commits into from
Oct 21, 2020

Conversation

stanislawK
Copy link
Contributor

Story / Bug id:

301

Description:

New endpoints for teams

Migrations:

N/A

New imports / dependencies:

N/A

What tests do I need to run to validate this change:

Populate database (team factory was created). Then check new endpoints:
GET,POST: /api/teams/
GET,PUT,DELETE: /api/teams//
POST,DELETE: /api/teams//members/

@stanislawK stanislawK linked an issue Oct 7, 2020 that may be closed by this pull request
Copy link
Member

@w1stler w1stler left a comment

Choose a reason for hiding this comment

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

Just some minor comments

response = rv.get_json()
assert rv.status_code == HTTPStatus.OK
if method == "get":
assert response == TeamSchema().dump(team_db)
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 we check for delete metohd that the item is removed?

def test_remove_all_members_from_team(auth_client, add_members_to_team):
"""Test remove all members from team."""
team_db = Team.query.get(1)
members_id = [member.id for member in team_db.members]
Copy link
Member

Choose a reason for hiding this comment

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

I think that would be pluarl for ids, not members: member_ids

@stanislawK stanislawK merged commit 409423c into CodeForPoznan:master Oct 21, 2020
@stanislawK stanislawK deleted the 301_teams_endpoints branch October 21, 2020 16:27
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.

Endpoint for teams
2 participants