mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
Fixing things is fun.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -871,67 +871,72 @@ def test_fetch_monthly_notification_statuses_per_service(notify_db_session):
|
||||
assert len(results) == 5
|
||||
# column order: date, service_id, service_name, notifaction_type, count_sending, count_delivered,
|
||||
# count_technical_failure, count_temporary_failure, count_permanent_failure, count_sent
|
||||
assert [x for x in results[0]] == [
|
||||
date(2019, 3, 1),
|
||||
service_two.id,
|
||||
"service two",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
]
|
||||
assert [x for x in results[1]] == [
|
||||
date(2019, 3, 1),
|
||||
service_one.id,
|
||||
"service one",
|
||||
NotificationType.EMAIL,
|
||||
5,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
]
|
||||
assert [x for x in results[2]] == [
|
||||
date(2019, 3, 1),
|
||||
service_one.id,
|
||||
"service one",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
]
|
||||
assert [x for x in results[3]] == [
|
||||
date(2019, 4, 1),
|
||||
service_two.id,
|
||||
"service two",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
]
|
||||
assert [x for x in results[4]] == [
|
||||
date(2019, 4, 1),
|
||||
service_one.id,
|
||||
"service one",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
expected = [
|
||||
[
|
||||
date(2019, 3, 1),
|
||||
service_two.id,
|
||||
"service two",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
0,
|
||||
],
|
||||
[
|
||||
date(2019, 3, 1),
|
||||
service_one.id,
|
||||
"service one",
|
||||
NotificationType.EMAIL,
|
||||
5,
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
],
|
||||
[
|
||||
date(2019, 3, 1),
|
||||
service_one.id,
|
||||
"service one",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
],
|
||||
[
|
||||
date(2019, 4, 1),
|
||||
service_two.id,
|
||||
"service two",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
0,
|
||||
],
|
||||
[
|
||||
date(2019, 4, 1),
|
||||
service_one.id,
|
||||
"service one",
|
||||
NotificationType.SMS,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
],
|
||||
]
|
||||
|
||||
for row in results:
|
||||
assert [x for x in row] in expected
|
||||
|
||||
|
||||
@freeze_time("2019-04-10 14:00")
|
||||
def test_fetch_monthly_notification_statuses_per_service_for_rows_that_should_be_excluded(
|
||||
|
||||
Reference in New Issue
Block a user