mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Down to 11 errors left to fix for tests.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from strenum import StrEnum # type: ignore [import-not-found]
|
||||
|
||||
# In 3.11 this is in the enum library. We will not need this external library any more.
|
||||
# The line will simply change from importing from strenum to importing from enum.
|
||||
# And the strenum library can then be removed from poetry.
|
||||
|
||||
@@ -78,7 +78,7 @@ def format_monthly_template_notification_stats(year, rows):
|
||||
def create_zeroed_stats_dicts():
|
||||
return {
|
||||
template_type: {status: 0 for status in ("requested", "delivered", "failed")}
|
||||
for template_type in TemplateType
|
||||
for template_type in (TemplateType.SMS, TemplateType.EMAIL)
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,8 @@ def create_empty_monthly_notification_status_stats_dict(year):
|
||||
# nested dicts - data[month][template type][status] = count
|
||||
return {
|
||||
start.strftime("%Y-%m"): {
|
||||
template_type: defaultdict(int) for template_type in TemplateType
|
||||
template_type: defaultdict(int)
|
||||
for template_type in (TemplateType.SMS, TemplateType.EMAIL)
|
||||
}
|
||||
for start in utc_month_starts
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user