From 0255ef7bdcdec0ee0b4f4678c86aa39a6f9e6ccb Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Tue, 4 Mar 2025 10:35:03 -0800 Subject: [PATCH] fix test --- .../app/dao/test_fact_notification_status_dao.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/app/dao/test_fact_notification_status_dao.py b/tests/app/dao/test_fact_notification_status_dao.py index 963642f7f..fc027f711 100644 --- a/tests/app/dao/test_fact_notification_status_dao.py +++ b/tests/app/dao/test_fact_notification_status_dao.py @@ -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):