-
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.
- Loading branch information
srh-sloan
committed
Jan 7, 2025
1 parent
02b16ed
commit a67f460
Showing
2 changed files
with
67 additions
and
0 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 |
---|---|---|
|
@@ -266,3 +266,43 @@ def test_send_application_deadline_reminder_email(self, app): | |
) | ||
assert resp == Notification(id=uuid.UUID("00000000-0000-0000-0000-000000000005")) | ||
assert request_matcher.call_count == 1 | ||
|
||
@responses.activate | ||
def test_send_assessment_assigned_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": "d4bdc13e-93b4-48ba-8d22-71bf4f480128", | ||
"personalisation": { | ||
"fund_name": "test fund", | ||
"reference_number": "ABC123", | ||
"project_name": "Unit test project", | ||
"assignment message": "Testing assignment", | ||
"assessment link": "http://google.com/assess", | ||
"lead assessor email": "[email protected]", | ||
}, | ||
"email_reply_to_id": "10668b8d-9472-4ce8-ae07-4fcc7bf93a9d", | ||
"reference": "abc123", | ||
} | ||
) | ||
], | ||
json={"id": "00000000-0000-0000-0000-000000000006"}, # partial GOV.UK Notify response | ||
) | ||
|
||
resp = get_notification_service().send_assessment_assigned_email( | ||
email_address="[email protected]", | ||
reference_number="ABC123", | ||
fund_name="test fund", | ||
contact_help_email="[email protected]", | ||
project_name="Unit test project", | ||
assignment_message="Testing assignment", | ||
assessment_link="http://google.com/assess", | ||
lead_assessor_email="[email protected]", | ||
govuk_notify_reference="abc123", | ||
) | ||
assert resp == Notification(id=uuid.UUID("00000000-0000-0000-0000-000000000006")) | ||
assert request_matcher.call_count == 1 |