mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
fix the right way
This commit is contained in:
@@ -280,10 +280,7 @@ def get_status_filters(service, message_type, statistics):
|
|||||||
if stats.get("failure") is not None:
|
if stats.get("failure") is not None:
|
||||||
stats["failed"] = stats["failure"]
|
stats["failed"] = stats["failure"]
|
||||||
|
|
||||||
if stats.get("pending") is None:
|
stats["pending"] = stats["requested"] - stats["delivered"] - stats["failed"]
|
||||||
stats["pending"] = 0
|
|
||||||
if stats.get("sending") is None:
|
|
||||||
stats["sending"] = 0
|
|
||||||
|
|
||||||
filters = [
|
filters = [
|
||||||
# key, label, option
|
# key, label, option
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ def test_time_left(job_created_at, expected_message):
|
|||||||
assert get_time_left(job_created_at) == expected_message
|
assert get_time_left(job_created_at) == expected_message
|
||||||
|
|
||||||
|
|
||||||
STATISTICS = {"sms": {"requested": 6, "failed": 2, "delivered": 1, "pending": 3}}
|
STATISTICS = {"sms": {"requested": 6, "failed": 2, "delivered": 1}}
|
||||||
|
|
||||||
|
|
||||||
def test_get_status_filters_calculates_stats(client_request):
|
def test_get_status_filters_calculates_stats(client_request):
|
||||||
|
|||||||
Reference in New Issue
Block a user