mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 17:31:14 -05:00
Updated sort order, endpoint defenition, and tests
for REQUESTED attribute
This commit is contained in:
@@ -301,13 +301,15 @@ def test_add_monthly_notification_status_stats():
|
||||
data = create_empty_monthly_notification_status_stats_dict(2018)
|
||||
# this data won't be affected
|
||||
data["2018-05"][NotificationType.EMAIL][NotificationStatus.SENDING] = 32
|
||||
data["2018-05"][NotificationType.EMAIL][StatisticsType.REQUESTED] = 32
|
||||
|
||||
# this data will get combined with the 8 from row_data
|
||||
data["2018-05"][NotificationType.SMS][NotificationStatus.SENDING] = 16
|
||||
data["2018-05"][NotificationType.SMS][StatisticsType.REQUESTED] = 16
|
||||
|
||||
add_monthly_notification_status_stats(data, rows)
|
||||
# first 3 months are empty
|
||||
print("********* ", data)
|
||||
|
||||
assert data == {
|
||||
"2018-01": {NotificationType.SMS: {}, NotificationType.EMAIL: {}},
|
||||
"2018-02": {NotificationType.SMS: {}, NotificationType.EMAIL: {}},
|
||||
@@ -326,7 +328,7 @@ def test_add_monthly_notification_status_stats():
|
||||
"2018-05": {
|
||||
NotificationType.SMS: {
|
||||
NotificationStatus.SENDING: 24,
|
||||
StatisticsType.REQUESTED: 8,
|
||||
StatisticsType.REQUESTED: 24,
|
||||
},
|
||||
NotificationType.EMAIL: {
|
||||
NotificationStatus.SENDING: 32,
|
||||
|
||||
Reference in New Issue
Block a user