mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Add postage for send-one-off letters.
The postage is set to europe or rest-of-world for international letters, otherwise the template postage is used. Also set international for letters.
This commit is contained in:
@@ -100,6 +100,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_sms(
|
||||
created_by_id=str(service.created_by_id),
|
||||
reply_to_text='testing',
|
||||
reference=None,
|
||||
postage=None
|
||||
)
|
||||
|
||||
|
||||
@@ -161,6 +162,7 @@ def test_send_one_off_notification_calls_persist_correctly_for_email(
|
||||
created_by_id=str(service.created_by_id),
|
||||
reply_to_text=None,
|
||||
reference=None,
|
||||
postage=None
|
||||
)
|
||||
|
||||
|
||||
@@ -188,8 +190,8 @@ def test_send_one_off_notification_calls_persist_correctly_for_letter(
|
||||
'to': 'First Last',
|
||||
'personalisation': {
|
||||
'name': 'foo',
|
||||
'address line 1': 'First Last',
|
||||
'address line 2': '1 Example Street',
|
||||
'address_line_1': 'First Last',
|
||||
'address_line_2': '1 Example Street',
|
||||
'postcode': 'SW1A 1AA',
|
||||
},
|
||||
'created_by': str(service.created_by_id)
|
||||
@@ -210,6 +212,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
|
||||
)
|
||||
|
||||
|
||||
@@ -362,6 +365,12 @@ def test_send_one_off_letter_notification_should_use_template_reply_to_text(samp
|
||||
data = {
|
||||
'to': 'user@example.com',
|
||||
'template_id': str(sample_letter_template.id),
|
||||
'personalisation': {
|
||||
'name': 'foo',
|
||||
'address_line_1': 'First Last',
|
||||
'address_line_2': '1 Example Street',
|
||||
'address_line_3': 'SW1A 1AA',
|
||||
},
|
||||
'created_by': str(sample_letter_template.service.created_by_id)
|
||||
}
|
||||
|
||||
@@ -383,6 +392,12 @@ def test_send_one_off_letter_should_not_make_pdf_in_research_mode(sample_letter_
|
||||
data = {
|
||||
'to': 'A. Name',
|
||||
'template_id': str(sample_letter_template.id),
|
||||
'personalisation': {
|
||||
'name': 'foo',
|
||||
'address_line_1': 'First Last',
|
||||
'address_line_2': '1 Example Street',
|
||||
'address_line_3': 'SW1A 1AA',
|
||||
},
|
||||
'created_by': str(sample_letter_template.service.created_by_id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user