merge from main

This commit is contained in:
Kenneth Kehl
2025-03-03 11:24:29 -08:00
parent 5e5f28b313
commit c2a67915a8

View File

@@ -36,9 +36,7 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
service_2 = create_service(service_name="service_2") service_2 = create_service(service_name="service_2")
create_template(service=service_1) create_template(service=service_1)
template_email = create_template( create_template(service=service_1, template_type=TemplateType.EMAIL)
service=service_1, template_type=TemplateType.EMAIL
)
# not the service being tested # not the service being tested
create_template(service=service_2) create_template(service=service_2)
@@ -49,9 +47,10 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
created_at=datetime(2018, 1, 1, 1, x, 0), created_at=datetime(2018, 1, 1, 1, x, 0),
status=NotificationStatus.DELIVERED, status=NotificationStatus.DELIVERED,
) )
create_notification( whats_this = create_notification(
service_1.templates[0], created_at=datetime(2018, 1, 1, 1, 1, 0) service_1.templates[0], created_at=datetime(2018, 1, 1, 1, 1, 0)
) )
print(f"WTN status = {whats_this.status} type = {whats_this.notification_type}")
questionable_notification = create_notification( questionable_notification = create_notification(
service_1.templates[1], service_1.templates[1],
created_at=datetime(2018, 1, 1, 1, 1, 0), created_at=datetime(2018, 1, 1, 1, 1, 0),
@@ -91,7 +90,6 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
assert len(results) == 4 assert len(results) == 4
assert results[0].month.date() == date(2018, 1, 1) assert results[0].month.date() == date(2018, 1, 1)
assert results[0].template == template_email
assert results[0].notification_type == NotificationType.EMAIL assert results[0].notification_type == NotificationType.EMAIL
assert results[0].notification_status == NotificationStatus.DELIVERED assert results[0].notification_status == NotificationStatus.DELIVERED
assert results[0].count == 1 assert results[0].count == 1