mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -04:00
Remove the template_postage parameter for persist_notification
It was confusing to have 2 differnt postage parameters.
This commit is contained in:
@@ -489,8 +489,7 @@ def test_persist_email_notification_stores_normalised_email(
|
||||
[
|
||||
("second", "first", "second"),
|
||||
("first", "first", "first"),
|
||||
("first", "second", "first"),
|
||||
(None, "second", "second")
|
||||
("first", "second", "first")
|
||||
]
|
||||
)
|
||||
def test_persist_letter_notification_finds_correct_postage(
|
||||
@@ -506,7 +505,6 @@ def test_persist_letter_notification_finds_correct_postage(
|
||||
persist_notification(
|
||||
template_id=template.id,
|
||||
template_version=template.version,
|
||||
template_postage=template.postage,
|
||||
recipient="Jane Doe, 10 Downing Street, London",
|
||||
service=sample_service_full_permissions,
|
||||
personalisation=None,
|
||||
@@ -536,7 +534,6 @@ def test_persist_notification_with_billable_units_stores_correct_info(
|
||||
api_key_id=None,
|
||||
key_type="normal",
|
||||
billable_units=3,
|
||||
template_postage=template.postage
|
||||
)
|
||||
persisted_notification = Notification.query.all()[0]
|
||||
|
||||
@@ -556,7 +553,6 @@ def test_persist_notification_for_international_letter(sample_letter_template, p
|
||||
key_type="normal",
|
||||
billable_units=3,
|
||||
postage=postage,
|
||||
template_postage='second'
|
||||
)
|
||||
persisted_notification = Notification.query.get(notification.id)
|
||||
assert persisted_notification.postage == postage
|
||||
|
||||
@@ -90,7 +90,6 @@ 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'},
|
||||
@@ -152,7 +151,6 @@ 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'},
|
||||
@@ -202,7 +200,6 @@ 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'],
|
||||
@@ -212,7 +209,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_letter(
|
||||
created_by_id=str(service.created_by_id),
|
||||
reply_to_text=None,
|
||||
reference='this-is-random-in-real-life',
|
||||
postage=None
|
||||
postage='first'
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user