mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Avoid call to database to get template in persist_notifications
This commit is contained in:
@@ -90,6 +90,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_sms(
|
||||
persist_mock.assert_called_once_with(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
template_postage=None,
|
||||
recipient=post_data['to'],
|
||||
service=template.service,
|
||||
personalisation={'name': 'foo'},
|
||||
@@ -127,6 +128,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_email(
|
||||
persist_mock.assert_called_once_with(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
template_postage=None,
|
||||
recipient=post_data['to'],
|
||||
service=template.service,
|
||||
personalisation={'name': 'foo'},
|
||||
@@ -153,6 +155,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_letter(
|
||||
template = create_template(
|
||||
service=service,
|
||||
template_type=LETTER_TYPE,
|
||||
postage='first',
|
||||
subject="Test subject",
|
||||
content="Hello (( Name))\nYour thing is due soon",
|
||||
)
|
||||
@@ -174,6 +177,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_letter(
|
||||
persist_mock.assert_called_once_with(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
template_postage='first',
|
||||
recipient=post_data['to'],
|
||||
service=template.service,
|
||||
personalisation=post_data['personalisation'],
|
||||
|
||||
Reference in New Issue
Block a user