mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into 963-message-parts-content-updates
This commit is contained in:
@@ -1955,7 +1955,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
"a" * 160,
|
||||
"Will be charged as 2 text messages",
|
||||
"Will be charged as 1 text message",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -1969,7 +1969,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
True,
|
||||
"a" * 147,
|
||||
"Will be charged as 2 text messages",
|
||||
"Will be charged as 1 text message",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -1984,7 +1984,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
"a" * 918,
|
||||
"Will be charged as 7 text messages",
|
||||
"Will be charged as 6 text messages",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -2025,11 +2025,8 @@ def test_set_template_sender(
|
||||
(
|
||||
"sms",
|
||||
False,
|
||||
# The length of this string in bytes is 210, needing two fragments.
|
||||
# Seems like previous calculation was wrong unless the number of characters
|
||||
# somehow has priority over the number of bytes in a fragment (?)
|
||||
"Ẅ" * 70,
|
||||
"Will be charged as 2 text messages",
|
||||
"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
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -2043,11 +2040,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
"Ẅ" * 918,
|
||||
# The length of this string in bytes is 2754. Divide by 140 and we get 19. Then round up.
|
||||
# Don't know why it was previously calculated as 14. They seem to have charged by characters
|
||||
# rather than length of the fragment in bytes.
|
||||
# "Will be charged as 14 text messages",
|
||||
"Will be charged as 20 text messages",
|
||||
"Will be charged as 14 text messages",
|
||||
None,
|
||||
),
|
||||
(
|
||||
|
||||
@@ -91,14 +91,14 @@ def get_notifications_csv_mock(
|
||||
None,
|
||||
[
|
||||
"Recipient,Template,Type,Sent by,Job,Carrier,Carrier Response,Status,Time\n",
|
||||
"foo@bar.com,foo,sms,,,ATT Mobility,Did not like it,Delivered,1943-04-19 08:00:00 US/Eastern\r\n",
|
||||
"foo@bar.com,foo,sms,,,ATT Mobility,Did not like it,Delivered,1943-04-19 08:00:00 AM US/Eastern\r\n",
|
||||
],
|
||||
),
|
||||
(
|
||||
"Anne Example",
|
||||
[
|
||||
"Recipient,Template,Type,Sent by,Job,Carrier,Carrier Response,Status,Time\n",
|
||||
"foo@bar.com,foo,sms,Anne Example,,ATT Mobility,Did not like it,Delivered,1943-04-19 08:00:00 US/Eastern\r\n", # noqa
|
||||
"foo@bar.com,foo,sms,Anne Example,,ATT Mobility,Did not like it,Delivered,1943-04-19 08:00:00 AM US/Eastern\r\n", # noqa
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -151,7 +151,7 @@ def test_generate_notifications_csv_without_job(
|
||||
"ATT Mobility",
|
||||
"Did not like it",
|
||||
"Delivered",
|
||||
"1943-04-19 08:00:00 US/Eastern",
|
||||
"1943-04-19 08:00:00 AM US/Eastern",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -187,7 +187,7 @@ def test_generate_notifications_csv_without_job(
|
||||
"ATT Mobility",
|
||||
"Did not like it",
|
||||
"Delivered",
|
||||
"1943-04-19 08:00:00 US/Eastern",
|
||||
"1943-04-19 08:00:00 AM US/Eastern",
|
||||
],
|
||||
),
|
||||
(
|
||||
@@ -223,7 +223,7 @@ def test_generate_notifications_csv_without_job(
|
||||
"ATT Mobility",
|
||||
"Did not like it",
|
||||
"Delivered",
|
||||
"1943-04-19 08:00:00 US/Eastern",
|
||||
"1943-04-19 08:00:00 AM US/Eastern",
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -398,4 +398,4 @@ def test_get_errors_for_csv(
|
||||
def test_convert_report_date_to_preferred_timezone():
|
||||
original = "2023-11-16 05:00:00"
|
||||
altered = convert_report_date_to_preferred_timezone(original)
|
||||
assert altered == "2023-11-16 00:00:00 US/Eastern"
|
||||
assert altered == "2023-11-16 12:00:00 AM US/Eastern"
|
||||
|
||||
Reference in New Issue
Block a user