More Enum goodness.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-18 10:26:40 -05:00
parent 43f18eed6a
commit df866e40f7
26 changed files with 379 additions and 278 deletions

View File

@@ -36,10 +36,10 @@ from app.models import (
NOTIFICATION_DELIVERED,
NOTIFICATION_SENT,
NOTIFICATION_STATUS_TYPES,
SMS_TYPE,
Job,
Notification,
NotificationHistory,
NotificationType,
)
from tests.app.db import (
create_ft_notification_status,
@@ -1748,7 +1748,10 @@ def test_get_service_ids_with_notifications_on_date_respects_gmt_bst(
sample_template, created_at_utc, date_to_check, expected_count
):
create_notification(template=sample_template, created_at=created_at_utc)
service_ids = get_service_ids_with_notifications_on_date(SMS_TYPE, date_to_check)
service_ids = get_service_ids_with_notifications_on_date(
NotificationType.SMS,
date_to_check,
)
assert len(service_ids) == expected_count
@@ -1759,8 +1762,8 @@ def test_get_service_ids_with_notifications_on_date_checks_ft_status(
create_ft_notification_status(template=sample_template, local_date="2022-01-02")
assert (
len(get_service_ids_with_notifications_on_date(SMS_TYPE, date(2022, 1, 1))) == 1
len(get_service_ids_with_notifications_on_date(NotificationType.SMS, date(2022, 1, 1))) == 1
)
assert (
len(get_service_ids_with_notifications_on_date(SMS_TYPE, date(2022, 1, 2))) == 1
len(get_service_ids_with_notifications_on_date(NotificationType.SMS, date(2022, 1, 2))) == 1
)