-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove unused create_alias task and fix tests
- Loading branch information
1 parent
97e02a5
commit c1fd44a
Showing
4 changed files
with
4 additions
and
57 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 |
---|---|---|
|
@@ -74,29 +74,6 @@ def setUp(self): | |
self.enterprise_sender_alias = 'Mock Enterprise Alias' | ||
self.contact_email = '[email protected]' | ||
|
||
@mock.patch('license_manager.apps.api.tasks.BrazeApiClient', return_value=mock.MagicMock()) | ||
def test_create_braze_aliases_task(self, mock_braze_client): | ||
""" | ||
Assert create_braze_aliases_task calls Braze API with the correct arguments. | ||
""" | ||
tasks.create_braze_aliases_task( | ||
self.email_recipient_list | ||
) | ||
mock_braze_client().create_braze_alias.assert_any_call( | ||
self.email_recipient_list, | ||
ENTERPRISE_BRAZE_ALIAS_LABEL, | ||
) | ||
|
||
@mock.patch('license_manager.apps.api.tasks.BrazeApiClient', side_effect=BrazeClientError) | ||
def test_create_braze_aliases_task_reraises_braze_exceptions(self, _): | ||
""" | ||
Assert create_braze_aliases_task reraises any braze exceptions. | ||
""" | ||
with self.assertRaises(BrazeClientError): | ||
tasks.create_braze_aliases_task( | ||
self.email_recipient_list | ||
) | ||
|
||
@mock.patch('license_manager.apps.api.tasks.EnterpriseApiClient', return_value=mock.MagicMock()) | ||
@mock.patch( | ||
'license_manager.apps.api_client.braze.BrazeClient.send_campaign_message', | ||
|
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