mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Use PassThrough renderer
Implements and depends on: - [ ] https://github.com/alphagov/notifications-utils/pull/49
This commit is contained in:
@@ -141,7 +141,7 @@ def test_send_sms_should_use_template_version_from_notification_not_latest(
|
||||
|
||||
mmg_client.send_sms.assert_called_once_with(
|
||||
to=format_phone_number(validate_phone_number("+447234123123")),
|
||||
content="Sample service: This is a template",
|
||||
content="Sample service: This is a template:\nwith a newline",
|
||||
reference=str(db_notification.id),
|
||||
sender=None
|
||||
)
|
||||
@@ -151,7 +151,7 @@ def test_send_sms_should_use_template_version_from_notification_not_latest(
|
||||
assert persisted_notification.template_id == sample_template.id
|
||||
assert persisted_notification.template_version == version_on_notification
|
||||
assert persisted_notification.template_version != sample_template.version
|
||||
assert persisted_notification.content_char_count == len("Sample service: This is a template")
|
||||
assert persisted_notification.content_char_count == len("Sample service: This is a template:\nwith a newline")
|
||||
assert persisted_notification.status == 'sending'
|
||||
assert not persisted_notification.personalisation
|
||||
|
||||
@@ -332,7 +332,7 @@ def test_should_send_sms_sender_from_service_if_present(
|
||||
|
||||
mmg_client.send_sms.assert_called_once_with(
|
||||
to=format_phone_number(validate_phone_number("+447234123123")),
|
||||
content="Sample service: This is a template",
|
||||
content="Sample service: This is a template:\nwith a newline",
|
||||
reference=str(db_notification.id),
|
||||
sender=sample_service.sms_sender
|
||||
)
|
||||
|
||||
@@ -154,7 +154,7 @@ def sample_template(notify_db,
|
||||
notify_db_session,
|
||||
template_name="Template Name",
|
||||
template_type="sms",
|
||||
content="This is a template",
|
||||
content="This is a template:\nwith a newline",
|
||||
archived=False,
|
||||
subject_line='Subject',
|
||||
user=None,
|
||||
|
||||
@@ -34,7 +34,7 @@ def test_get_sms_notification_by_id(notify_api, sample_notification):
|
||||
}
|
||||
assert notification['to'] == '+447700900855'
|
||||
assert notification['service'] == str(sample_notification.service_id)
|
||||
assert notification['body'] == "This is a template" # sample_template.content
|
||||
assert notification['body'] == "This is a template:\nwith a newline"
|
||||
assert not notification.get('subject')
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ def test_get_all_notifications(notify_api, sample_notification):
|
||||
|
||||
assert notifications['notifications'][0]['to'] == '+447700900855'
|
||||
assert notifications['notifications'][0]['service'] == str(sample_notification.service_id)
|
||||
assert notifications['notifications'][0]['body'] == "This is a template" # sample_template.content
|
||||
assert notifications['notifications'][0]['body'] == "This is a template:\nwith a newline"
|
||||
|
||||
|
||||
def test_normal_api_key_returns_notifications_created_from_jobs_and_from_api(
|
||||
|
||||
Reference in New Issue
Block a user