Test aggregate_notifications_stats

This commit is contained in:
Pea Tyczynska
2019-01-16 10:54:52 +00:00
parent 06ab25665e
commit 52526f2b9f
2 changed files with 21 additions and 4 deletions

View File

@@ -293,7 +293,7 @@ def aggregate_notifications_stats(template_statistics):
notifications = {
template_type: {
status: 0 for status in ('requested', 'delivered', 'failed')
} for template_type in current_service.TEMPLATE_TYPES
} for template_type in ["sms", "email", "letter"]
}
for stat in template_statistics:
notifications[stat["template_type"]]["requested"] += stat["count"]