-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add teams eventing and tests. #9607
Conversation
@@ -1107,7 +1129,7 @@ def test_discussion_privileged_user_can_edit_team(self, role): | |||
|
|||
@attr('shard_5') | |||
@ddt.ddt | |||
class TeamPageTest(TeamsTabBase): | |||
class TeamPageTest(TeamsTabBase, EventsTestMixin): |
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.
This shouldn't need to inherit from EventsTestMixin
, since TeamsTabBase
already has it.
Looks good to me, other than my one question about mixin inheritance. 👍 |
1bf4796
to
9bea1cd
Compare
@@ -905,13 +909,31 @@ def test_user_can_create_new_team_successfully(self): | |||
And the number of teams should be updated on the topic card | |||
And if I switch to "My Team", the newly created team is displayed | |||
""" | |||
|
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.
Nit: why this blank line?
Another nit: document the expected event in the docstring.
"""Test cases for the team creation endpoint.""" | ||
|
||
def setUp(self): # pylint: disable=arguments-differ |
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.
Would the arguments-differ
warning go away if you were to add *args, **kwargs
to the method signature?
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.
Yes, but then I'd have to handle the 'Unused argument' errors from pylint.
@@ -1053,6 +1077,18 @@ def test_access(self, user, status): | |||
memberships = self.get_membership_list(200, {'team_id': self.solar_team.team_id}) | |||
self.assertEqual(memberships['count'], 2) | |||
|
|||
add_method = 'joined_from_team_view' if user == 'student_enrolled_not_on_team' else 'added_by_another_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.
Why do we expect 'added_by_another_user'
for staff, course_staff, and community_ta? Aren't they adding themselves?
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.
No, for this test, every user is adding 'student_enrolled_not_on_team'.
👍 |
9bea1cd
to
a743f4a
Compare
Only failing bok choy test is the known-flaky video control test. Merging. |
Add teams eventing and tests.
@catong Here's the first one that went in. |
TNL-3185 & TNL-3186
Implements 3 of the events from the Teams Events Spec:
edx.team.created
,edx.team.learner_added
,edx.team.learner_removed
. Also includes unit and bok choy tests.Testing
Reviewers
If you've been tagged for review, please check your corresponding box once you've given the 👍.
Post-review