-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from communitiesuk/bau/direct-govuk-notify-ca…
…lls-4 Send "application deadline reminder" email synchronously
- Loading branch information
Showing
5 changed files
with
73 additions
and
166 deletions.
There are no files selected for viewing
70 changes: 0 additions & 70 deletions
70
application_store/external_services/models/notification.py
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -226,3 +226,38 @@ def test_send_submit_application_email(self, app): | |
) | ||
assert resp == Notification(id=uuid.UUID("00000000-0000-0000-0000-000000000003")) | ||
assert request_matcher.call_count == 1 | ||
|
||
@responses.activate | ||
def test_send_application_deadline_reminder_email(self, app): | ||
request_matcher = responses.post( | ||
url="https://api.notifications.service.gov.uk/v2/notifications/email", | ||
status=201, | ||
match=[ | ||
matchers.json_params_matcher( | ||
{ | ||
"email_address": "[email protected]", | ||
"template_id": "e41cc73d-6947-4cbb-aedd-4ab2f470a2d2", | ||
"personalisation": { | ||
"name of fund": "test fund", | ||
"application reference": "app-123", | ||
"round name": "test round", | ||
"application deadline": "2025-01-01T10:00:00", | ||
}, | ||
"reference": "abc123", | ||
} | ||
) | ||
], | ||
json={"id": "00000000-0000-0000-0000-000000000005"}, # partial GOV.UK Notify response | ||
) | ||
|
||
resp = get_notification_service().send_application_deadline_reminder_email( | ||
"[email protected]", | ||
fund_name="test fund", | ||
application_reference="app-123", | ||
round_name="test round", | ||
deadline="2025-01-01T10:00:00", | ||
contact_help_email="[email protected]", | ||
govuk_notify_reference="abc123", | ||
) | ||
assert resp == Notification(id=uuid.UUID("00000000-0000-0000-0000-000000000005")) | ||
assert request_matcher.call_count == 1 |