mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Merge pull request #940 from GSA/update-utils-022
Update utils to 0.2.2
This commit is contained in:
4
poetry.lock
generated
4
poetry.lock
generated
@@ -1680,7 +1680,7 @@ requests = ">=2.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "notifications-utils"
|
||||
version = "0.2.0"
|
||||
version = "0.2.2"
|
||||
description = ""
|
||||
optional = false
|
||||
python-versions = ">=3.9,<3.12"
|
||||
@@ -1732,7 +1732,7 @@ werkzeug = "^3.0.1"
|
||||
type = "git"
|
||||
url = "https://github.com/GSA/notifications-utils.git"
|
||||
reference = "HEAD"
|
||||
resolved_reference = "a1c64deb1aad8028ad52c58529c0267a318743b7"
|
||||
resolved_reference = "f43dbe3ac846d2a7c06f98120ca4533043d9f864"
|
||||
|
||||
[[package]]
|
||||
name = "numpy"
|
||||
|
||||
@@ -1966,18 +1966,11 @@ def test_set_template_sender(
|
||||
@pytest.mark.parametrize(
|
||||
("template_type", "prefix_sms", "content", "expected_message", "expected_class"),
|
||||
[
|
||||
(
|
||||
"sms",
|
||||
False,
|
||||
"",
|
||||
"Will be charged as 1 text message",
|
||||
None,
|
||||
),
|
||||
(
|
||||
"sms",
|
||||
False,
|
||||
"a" * 160,
|
||||
"Will be charged as 1 text message",
|
||||
"Will be charged as 2 text messages",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -1988,11 +1981,10 @@ def test_set_template_sender(
|
||||
None,
|
||||
),
|
||||
(
|
||||
# service name takes 13 characters, 147 + 13 = 160
|
||||
"sms",
|
||||
True,
|
||||
"a" * 147,
|
||||
"Will be charged as 1 text message",
|
||||
"Will be charged as 2 text messages",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -2007,7 +1999,7 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
"a" * 918,
|
||||
"Will be charged as 6 text messages",
|
||||
"Will be charged as 7 text messages",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -2048,8 +2040,11 @@ 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 1 text message",
|
||||
"Will be charged as 2 text messages",
|
||||
None,
|
||||
),
|
||||
(
|
||||
@@ -2063,7 +2058,11 @@ def test_set_template_sender(
|
||||
"sms",
|
||||
False,
|
||||
"Ẅ" * 918,
|
||||
"Will be charged as 14 text messages",
|
||||
# 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",
|
||||
None,
|
||||
),
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user