mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Update test_templates.py
This commit is contained in:
@@ -1748,7 +1748,7 @@ def test_can_create_email_template_with_emoji(
|
|||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("template_type", "expected_error"),
|
("template_type", "expected_error"),
|
||||||
[
|
[
|
||||||
("sms", ("You cannot use 🍜 in text messages.")),
|
("sms", ("Please remove the unaccepted character 🍜 in your message, then save again")),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_should_not_create_sms_template_with_emoji(
|
def test_should_not_create_sms_template_with_emoji(
|
||||||
@@ -1772,14 +1772,15 @@ def test_should_not_create_sms_template_with_emoji(
|
|||||||
},
|
},
|
||||||
_expected_status=200,
|
_expected_status=200,
|
||||||
)
|
)
|
||||||
assert expected_error in page.text
|
# print(page.main.prettify())
|
||||||
|
assert expected_error in normalize_spaces(page.select_one("#template_content-error").text)
|
||||||
assert mock_create_service_template.called is False
|
assert mock_create_service_template.called is False
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("template_type", "expected_error"),
|
("template_type", "expected_error"),
|
||||||
[
|
[
|
||||||
("sms", ("You cannot use 🍔 in text messages.")),
|
("sms", ("Please remove the unaccepted character 🍔 in your message, then save again")),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_should_not_update_sms_template_with_emoji(
|
def test_should_not_update_sms_template_with_emoji(
|
||||||
@@ -2031,7 +2032,7 @@ def test_set_template_sender(
|
|||||||
"sms",
|
"sms",
|
||||||
False,
|
False,
|
||||||
"Ẅ" * 70,
|
"Ẅ" * 70,
|
||||||
"Will be charged as 1 text message. Use of characters outside the IEC_8859-1 character set may increase the message fragment count, resulting in additional charges, and these IEC_8859-1 characters may not display properly on some older mobile devices.", # noqa E501
|
"Will be charged as 1 text message.", # noqa E501
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -2059,7 +2060,7 @@ def test_set_template_sender(
|
|||||||
"sms",
|
"sms",
|
||||||
False,
|
False,
|
||||||
"Hello ((name))",
|
"Hello ((name))",
|
||||||
"Will be charged as 1 text message (not including personalization)",
|
"Will be charged as 1 text message.",
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -2067,7 +2068,7 @@ def test_set_template_sender(
|
|||||||
"sms",
|
"sms",
|
||||||
False,
|
False,
|
||||||
f'Hello (( {"a" * 999} ))',
|
f'Hello (( {"a" * 999} ))',
|
||||||
"Will be charged as 1 text message (not including personalization)",
|
"Will be charged as 1 text message.",
|
||||||
None,
|
None,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user