migrate bst_date to local_date

This commit is contained in:
stvnrlly
2022-11-21 11:49:59 -05:00
parent 99de747a36
commit 9e7ee1c0f8
39 changed files with 315 additions and 315 deletions

View File

@@ -1762,7 +1762,7 @@ def test_get_service_ids_with_notifications_on_date_checks_ft_status(
sample_template,
):
create_notification(template=sample_template, created_at='2022-01-01T09:30')
create_ft_notification_status(template=sample_template, bst_date='2022-01-02')
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
assert len(get_service_ids_with_notifications_on_date(SMS_TYPE, date(2022, 1, 2))) == 1

View File

@@ -4,11 +4,11 @@ from app.dao.notifications_dao import dao_get_last_date_template_was_used
from tests.app.db import create_ft_notification_status, create_notification
def test_dao_get_last_date_template_was_used_returns_bst_date_from_stats_table(
def test_dao_get_last_date_template_was_used_returns_local_date_from_stats_table(
sample_template
):
last_status_date = (datetime.utcnow() - timedelta(days=2)).date()
create_ft_notification_status(bst_date=last_status_date,
create_ft_notification_status(local_date=last_status_date,
template=sample_template)
last_used_date = dao_get_last_date_template_was_used(template_id=sample_template.id,
@@ -23,7 +23,7 @@ def test_dao_get_last_date_template_was_used_returns_created_at_from_notificatio
create_notification(template=sample_template, created_at=last_notification_date)
last_status_date = (datetime.utcnow() - timedelta(days=2)).date()
create_ft_notification_status(bst_date=last_status_date, template=sample_template)
create_ft_notification_status(local_date=last_status_date, template=sample_template)
last_used_date = dao_get_last_date_template_was_used(template_id=sample_template.id,
service_id=sample_template.service_id)
assert last_used_date == last_notification_date