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

created CurrentTeamAPIView and serializer with test #131

Closed
wants to merge 4 commits into from

Conversation

1999akinori
Copy link
Contributor

@1999akinori 1999akinori commented Aug 21, 2020

  • added new teams/team urlpath to event/api_urls/
  • created CurrentTeamAPIView at event/views.py
  • test for user not logged in
  • test for user having no profile and trying to access their team
  • test for user having a profile and trying to access their team
  • test for TeamSerializer, whether the serializer is outputting what we expect.

CurrentUserAPIView test cases are failing since the profile serializer was changed to include team.

hackathon_site/event/tests.py Outdated Show resolved Hide resolved
hackathon_site/event/test_api.py Outdated Show resolved Hide resolved
hackathon_site/event/test_api.py Outdated Show resolved Hide resolved
hackathon_site/event/tests.py Outdated Show resolved Hide resolved
hackathon_site/event/tests.py Show resolved Hide resolved
hackathon_site/event/tests.py Outdated Show resolved Hide resolved
"last_name": user.last_name,
"email": user.email,
"profile": None,
"groups": [],
Copy link
Member

Choose a reason for hiding this comment

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

As with above, we want to test that the groups are actually given in a list that uses GroupSerializer, which itself is tested independently so we know everything is correct.

hackathon_site/event/tests.py Outdated Show resolved Hide resolved
hackathon_site/event/test_api.py Outdated Show resolved Hide resolved
hackathon_site/event/test_api.py Outdated Show resolved Hide resolved
@grahamhoyes
Copy link
Member

Closed by #280

@grahamhoyes grahamhoyes closed this Jul 3, 2021
@grahamhoyes grahamhoyes deleted the 52-api-team branch July 31, 2021 21:51
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.

3 participants