mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-20 13:12:27 -04:00
revert previous commit
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user