-
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.
Updating template ID for welsh translation
Added unit test for welsh template
- Loading branch information
srh-sloan
committed
Jan 7, 2025
1 parent
3763115
commit 10044ab
Showing
2 changed files
with
48 additions
and
2 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 |
---|---|---|
|
@@ -227,6 +227,52 @@ 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_submit_application_email_welsh(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": "60bb6baa-0ef9-4059-954e-7c2744e6c63a", | ||
"personalisation": { | ||
"name of fund": "COF-EOI", | ||
"application reference": "app-123", | ||
"date submitted": "10 February 2024 at 10:00am", | ||
"round name": "test round", | ||
"question": { | ||
"file": "YWJjMTIz", | ||
"filename": None, | ||
"confirm_email_before_download": None, | ||
"retention_period": None, | ||
}, | ||
"URL of prospectus": "https://prospectus", | ||
"contact email": "[email protected]", | ||
}, | ||
"reference": "abc123", | ||
} | ||
) | ||
], | ||
json={"id": "00000000-0000-0000-0000-000000000003"}, # partial GOV.UK Notify response | ||
) | ||
|
||
resp = get_notification_service().send_submit_application_email( | ||
"[email protected]", | ||
language="cy", | ||
fund_name="COF-EOI", | ||
application_reference="app-123", | ||
submission_date="2024-02-10T10:00:00.000000", | ||
round_name="test round", | ||
questions="YWJjMTIz", | ||
prospectus_url="https://prospectus", | ||
contact_help_email="[email protected]", | ||
govuk_notify_reference="abc123", | ||
) | ||
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( | ||
|