-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: removing applies_to_all_context EnterpriseGroup references (#2268)
* fix: removing instances of old variable * fix: removing migration file
- Loading branch information
Showing
8 changed files
with
8 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
Your project description goes here. | ||
""" | ||
|
||
__version__ = "4.28.2" | ||
__version__ = "4.28.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8145,7 +8145,6 @@ def test_list_learners_filtered(self): | |
""" | ||
group = EnterpriseGroupFactory( | ||
enterprise_customer=self.enterprise_customer, | ||
applies_to_all_contexts=True, | ||
) | ||
pending_user = PendingEnterpriseCustomerUserFactory( | ||
user_email="[email protected]", | ||
|
@@ -8160,7 +8159,6 @@ def test_list_learners_filtered(self): | |
|
||
assert response.json().get('count') == 0 | ||
|
||
group.applies_to_all_contexts = False | ||
group.save() | ||
pending_membership = EnterpriseGroupMembershipFactory( | ||
group=group, | ||
|
@@ -8203,7 +8201,6 @@ def test_list_learners_filtered(self): | |
def test_list_removed_learners(self): | ||
group = EnterpriseGroupFactory( | ||
enterprise_customer=self.enterprise_customer, | ||
applies_to_all_contexts=False, | ||
) | ||
memberships_to_delete = [] | ||
membership = EnterpriseGroupMembershipFactory( | ||
|
@@ -8895,32 +8892,6 @@ def test_remove_learners_from_group_only_removes_from_specified_group(self): | |
EnterpriseGroupMembership.objects.get(pk=membership_to_remove.pk) | ||
assert EnterpriseGroupMembership.objects.get(pk=existing_membership.pk) | ||
|
||
def test_group_applies_to_all_contexts_learner_list(self): | ||
""" | ||
Test that hitting the enterprise-group `/learners/` endpoint for a group that has ``applies_to_all_contexts`` | ||
will return all learners in the group's org regardless of what membership records exist. | ||
""" | ||
new_group = EnterpriseGroupFactory(applies_to_all_contexts=True) | ||
new_user = EnterpriseCustomerUserFactory( | ||
user_id=self.user.id, enterprise_customer=new_group.enterprise_customer, | ||
active=True | ||
) | ||
pending_user = PendingEnterpriseCustomerUserFactory( | ||
enterprise_customer=new_group.enterprise_customer, | ||
) | ||
url = settings.TEST_SERVER + reverse( | ||
'enterprise-group-learners', | ||
kwargs={'group_uuid': new_group.uuid}, | ||
) | ||
response = self.client.get(url) | ||
results = response.json().get('results') | ||
for result in results: | ||
assert ( | ||
result.get('pending_enterprise_customer_user_id') == pending_user.id | ||
) or ( | ||
result.get('enterprise_customer_user_id') == new_user.id | ||
) | ||
|
||
def test_group_assign_realized_learner_adds_activated_at(self): | ||
""" | ||
Test that newly created membership records associated with an existing user have an activated at value written | ||
|