revert previous commit

This commit is contained in:
Kenneth Kehl
2024-03-07 10:17:37 -08:00
parent f42cf3bd22
commit b3966ae800
2 changed files with 2 additions and 3 deletions

View File

@@ -272,7 +272,7 @@ def get_status_filters(service, message_type, statistics):
if message_type is None:
stats = {
key: sum(statistics[message_type][key] for message_type in {"email", "sms"})
for key in {"requested", "delivered", "failure"}
for key in {"requested", "delivered", "failed"}
}
else:
stats = statistics[message_type]

View File

@@ -531,13 +531,12 @@ def test_time_left(job_created_at, expected_message):
assert get_time_left(job_created_at) == expected_message
STATISTICS = {"sms": {"requested": 6, "failed": 2, "delivered": 1}}
STATISTICS = {"sms": {"requested": 6, "failed": 2, "delivered": 1, "pending": 3}}
def test_get_status_filters_calculates_stats(client_request):
ret = get_status_filters(Service({"id": "foo"}), "sms", STATISTICS)
# TODO WHY DO WE THINK THE PENDING COUNT SHOULD BE 3? HOW DID THIS WORK BEFORE?
assert {label: count for label, _option, _link, count in ret} == {
"total": 6,
"pending": 3,