mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
fix test
This commit is contained in:
@@ -36,7 +36,6 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
service_2 = create_service(service_name="service_2")
|
||||
|
||||
create_template(service=service_1)
|
||||
create_template(service=service_1, template_type=TemplateType.EMAIL)
|
||||
# not the service being tested
|
||||
create_template(service=service_2)
|
||||
|
||||
@@ -50,11 +49,6 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
create_notification(
|
||||
service_1.templates[0], created_at=datetime(2018, 1, 1, 1, 1, 0)
|
||||
)
|
||||
create_notification(
|
||||
service_1.templates[1],
|
||||
created_at=datetime(2018, 1, 1, 1, 1, 0),
|
||||
status=NotificationStatus.DELIVERED,
|
||||
)
|
||||
|
||||
create_notification(
|
||||
service_1.templates[0],
|
||||
@@ -83,13 +77,7 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
key=lambda x: (x.month, x.notification_type, x.notification_status),
|
||||
)
|
||||
|
||||
assert len(results) == 4
|
||||
print(results)
|
||||
|
||||
assert results[0].month.date() == date(2018, 1, 1)
|
||||
assert results[0].notification_type == NotificationType.EMAIL
|
||||
assert results[0].notification_status == NotificationStatus.DELIVERED
|
||||
assert results[0].count == 1
|
||||
assert len(results) == 3
|
||||
|
||||
assert results[1].month.date() == date(2018, 1, 1)
|
||||
assert results[1].notification_type == NotificationType.SMS
|
||||
@@ -104,7 +92,7 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
assert results[3].month.date() == date(2018, 2, 1)
|
||||
assert results[3].notification_type == NotificationType.SMS
|
||||
assert results[3].notification_status == NotificationStatus.DELIVERED
|
||||
assert results[3].count == 1000
|
||||
assert results[3].count == 1
|
||||
|
||||
|
||||
def test_fetch_notification_status_for_service_for_day(notify_db_session):
|
||||
|
||||
Reference in New Issue
Block a user