-
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: submit the create_enterprise_enrollment task with a configurable…
… countdown Also removes python 3.8 from CI matrix.
- Loading branch information
1 parent
a178e8a
commit 007abaf
Showing
9 changed files
with
36 additions
and
23 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
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.20.4" | ||
__version__ = "4.20.5" |
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 |
---|---|---|
|
@@ -843,7 +843,7 @@ def setUp(self): | |
self.non_enterprise_user = UserFactory(id=999, email='[email protected]') | ||
super().setUp() | ||
|
||
@mock.patch('enterprise.tasks.create_enterprise_enrollment.delay') | ||
@mock.patch('enterprise.tasks.create_enterprise_enrollment.apply_async') | ||
def test_receiver_calls_task_if_ecu_exists(self, mock_task): | ||
""" | ||
Receiver should call a task | ||
|
@@ -863,11 +863,12 @@ def test_receiver_calls_task_if_ecu_exists(self, mock_task): | |
'created': True, | ||
} | ||
|
||
with self.captureOnCommitCallbacks(execute=True): | ||
with self.captureOnCommitCallbacks(execute=True), \ | ||
override_settings(CREATE_ENTERPRISE_ENROLLMENT_TASK_COUNTDOWN=42): | ||
create_enterprise_enrollment_receiver(sender, instance, **kwargs) | ||
mock_task.assert_called_once_with(str(instance.course_id), self.enterprise_customer_user.id) | ||
mock_task.assert_called_once_with((str(instance.course_id), self.enterprise_customer_user.id), countdown=42) | ||
|
||
@mock.patch('enterprise.tasks.create_enterprise_enrollment.delay') | ||
@mock.patch('enterprise.tasks.create_enterprise_enrollment.apply_async') | ||
def test_receiver_does_not_call_task_if_ecu_not_exists(self, mock_task): | ||
""" | ||
Receiver should NOT call a task | ||
|