mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
Refactored non ascii letter recipients test
This commit is contained in:
@@ -333,6 +333,7 @@ def send_test_preview(service_id, template_id, filetype):
|
|||||||
|
|
||||||
|
|
||||||
def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False):
|
def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False):
|
||||||
|
|
||||||
if not session.get('upload_data'):
|
if not session.get('upload_data'):
|
||||||
# if we just return a `redirect` (302) object here, we'll get errors when we try and unpack in the
|
# if we just return a `redirect` (302) object here, we'll get errors when we try and unpack in the
|
||||||
# check_messages route - so raise a werkzeug.routing redirect to ensure that doesn't happen.
|
# check_messages route - so raise a werkzeug.routing redirect to ensure that doesn't happen.
|
||||||
|
|||||||
@@ -1529,7 +1529,7 @@ def test_check_messages_shows_over_max_row_error(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_special_characters_in_letter_recipients_file_shows_error(
|
def test_non_ascii_characters_in_letter_recipients_file_shows_error(
|
||||||
logged_in_client,
|
logged_in_client,
|
||||||
mock_get_users_by_service,
|
mock_get_users_by_service,
|
||||||
mock_get_service,
|
mock_get_service,
|
||||||
@@ -1544,7 +1544,7 @@ def test_special_characters_in_letter_recipients_file_shows_error(
|
|||||||
mock_recipients.as_dict = {
|
mock_recipients.as_dict = {
|
||||||
'file_name': 'invalid_characters.csv', 'data':
|
'file_name': 'invalid_characters.csv', 'data':
|
||||||
'address line 1,address line 2,address line 3,address line 4,address line 5,address line 6,postcode\r\n'
|
'address line 1,address line 2,address line 3,address line 4,address line 5,address line 6,postcode\r\n'
|
||||||
'B. √Name,345 Example Street,,,,,ZM4 6HQ©'
|
'Fran\u00e7oise Fr\u00e9d\u00e9rich,345 Example Street,,,,,ZM4 6HQ'
|
||||||
}
|
}
|
||||||
|
|
||||||
response = logged_in_client.post(
|
response = logged_in_client.post(
|
||||||
|
|||||||
Reference in New Issue
Block a user