-
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.
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 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 |
---|---|---|
|
@@ -26,6 +26,9 @@ | |
UNASSIGNED, | ||
NotificationChoices, | ||
) | ||
from license_manager.apps.subscriptions.event_utils import ( | ||
get_license_tracking_properties, | ||
) | ||
from license_manager.apps.subscriptions.exceptions import LicenseRevocationError | ||
from license_manager.apps.subscriptions.models import ( | ||
CustomerAgreement, | ||
|
@@ -202,9 +205,10 @@ def test_send_reminder_email_task(self, mock_enterprise_client, mock_braze_clien | |
self.assertNotIn('[email protected]', called_emails) | ||
|
||
for user_email in self.email_recipient_list: | ||
expected_license_key = str(self.subscription_plan.licenses.get( | ||
expected_license = self.subscription_plan.licenses.get( | ||
user_email=user_email | ||
).activation_key) | ||
) | ||
expected_license_key = str(expected_license.activation_key) | ||
mock_enterprise_client().get_enterprise_customer_data.assert_any_call( | ||
self.subscription_plan.enterprise_customer_uuid | ||
) | ||
|
@@ -229,6 +233,7 @@ def test_send_reminder_email_task(self, mock_enterprise_client, mock_braze_clien | |
'alias_name': user_email, | ||
}, | ||
} | ||
expected_recipient['attributes'].update(get_license_tracking_properties(expected_license)) | ||
mock_braze_client().send_campaign_message.assert_any_call( | ||
settings.BRAZE_ASSIGNMENT_EMAIL_CAMPAIGN, | ||
recipients=[expected_recipient], | ||
|