Updated sort order, endpoint defenition, and tests

for REQUESTED attribute
This commit is contained in:
Anastasia Gradova
2024-06-06 22:11:24 -06:00
parent cd188180ca
commit 0082ba3dd0
3 changed files with 24 additions and 9 deletions

View File

@@ -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,