mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 14:28:25 -04:00
Merge pull request #1104 from alphagov/bump-utils-addresses-in-letters
Handle partial letter addresses more gracefully
This commit is contained in:
@@ -29,4 +29,4 @@ whitenoise==1.0.6 #manages static assets
|
|||||||
# pin to minor version 3.1.x
|
# pin to minor version 3.1.x
|
||||||
notifications-python-client>=3.1,<3.2
|
notifications-python-client>=3.1,<3.2
|
||||||
|
|
||||||
git+https://github.com/alphagov/notifications-utils.git@13.2.1#egg=notifications-utils==13.2.1
|
git+https://github.com/alphagov/notifications-utils.git@13.3.1#egg=notifications-utils==13.3.1
|
||||||
|
|||||||
@@ -444,8 +444,10 @@ def test_should_show_preview_letter_message(
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.content_type == expected_content_type
|
assert response.content_type == expected_content_type
|
||||||
mock_get_service_letter_template.assert_called_with(service_id, template_id)
|
mock_get_service_letter_template.assert_called_with(service_id, template_id)
|
||||||
|
assert mock_letter_preview.call_args[0][0]['subject'] == (
|
||||||
|
'Subject'
|
||||||
|
)
|
||||||
assert mock_letter_preview.call_args[0][0]['message'] == (
|
assert mock_letter_preview.call_args[0][0]['message'] == (
|
||||||
'<h2>Subject</h2>\n'
|
|
||||||
'<p>Template <em>content</em> with & entity</p>'
|
'<p>Template <em>content</em> with & entity</p>'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ def test_should_show_preview_letter_templates(
|
|||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert response.content_type == expected_content_type
|
assert response.content_type == expected_content_type
|
||||||
mock_get_service_email_template.assert_called_with(service_id, template_id, **extra_view_args)
|
mock_get_service_email_template.assert_called_with(service_id, template_id, **extra_view_args)
|
||||||
print(mock_letter_preview)
|
assert mock_letter_preview.call_args[0][0]['subject'] == (
|
||||||
print(mock_letter_preview.call_args)
|
"Your <span class='placeholder'>((thing))</span> is due soon"
|
||||||
|
)
|
||||||
assert mock_letter_preview.call_args[0][0]['message'] == (
|
assert mock_letter_preview.call_args[0][0]['message'] == (
|
||||||
"<h2>Your <span class='placeholder'>((thing))</span> is due soon</h2>\n"
|
|
||||||
"<p>Your vehicle tax expires on <span class='placeholder'>((date))</span></p>"
|
"<p>Your vehicle tax expires on <span class='placeholder'>((date))</span></p>"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user