mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
migrate bst_date to local_date
This commit is contained in:
@@ -374,21 +374,21 @@ def test_fetch_monthly_template_usage_for_service(sample_service):
|
||||
template_two = create_template(service=sample_service, template_type='email', template_name='b')
|
||||
template_three = create_template(service=sample_service, template_type='letter', template_name='c')
|
||||
|
||||
create_ft_notification_status(bst_date=date(2017, 12, 10),
|
||||
create_ft_notification_status(local_date=date(2017, 12, 10),
|
||||
service=sample_service,
|
||||
template=template_two,
|
||||
count=3)
|
||||
create_ft_notification_status(bst_date=date(2017, 12, 10),
|
||||
create_ft_notification_status(local_date=date(2017, 12, 10),
|
||||
service=sample_service,
|
||||
template=template_one,
|
||||
count=6)
|
||||
|
||||
create_ft_notification_status(bst_date=date(2018, 1, 1),
|
||||
create_ft_notification_status(local_date=date(2018, 1, 1),
|
||||
service=sample_service,
|
||||
template=template_one,
|
||||
count=4)
|
||||
|
||||
create_ft_notification_status(bst_date=date(2018, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2018, 3, 1),
|
||||
service=sample_service,
|
||||
template=template_three,
|
||||
count=5)
|
||||
@@ -438,15 +438,15 @@ def test_fetch_monthly_template_usage_for_service_does_join_to_notifications_if_
|
||||
):
|
||||
template_one = create_template(service=sample_service, template_type='sms', template_name='a')
|
||||
template_two = create_template(service=sample_service, template_type='email', template_name='b')
|
||||
create_ft_notification_status(bst_date=date(2018, 2, 1),
|
||||
create_ft_notification_status(local_date=date(2018, 2, 1),
|
||||
service=template_two.service,
|
||||
template=template_two,
|
||||
count=15)
|
||||
create_ft_notification_status(bst_date=date(2018, 2, 2),
|
||||
create_ft_notification_status(local_date=date(2018, 2, 2),
|
||||
service=template_one.service,
|
||||
template=template_one,
|
||||
count=20)
|
||||
create_ft_notification_status(bst_date=date(2018, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2018, 3, 1),
|
||||
service=template_one.service,
|
||||
template=template_one,
|
||||
count=3)
|
||||
@@ -477,7 +477,7 @@ def test_fetch_monthly_template_usage_for_service_does_join_to_notifications_if_
|
||||
def test_fetch_monthly_template_usage_for_service_does_not_include_cancelled_status(
|
||||
sample_template
|
||||
):
|
||||
create_ft_notification_status(bst_date=date(2018, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2018, 3, 1),
|
||||
service=sample_template.service,
|
||||
template=sample_template,
|
||||
notification_status='cancelled',
|
||||
@@ -494,7 +494,7 @@ def test_fetch_monthly_template_usage_for_service_does_not_include_cancelled_sta
|
||||
def test_fetch_monthly_template_usage_for_service_does_not_include_test_notifications(
|
||||
sample_template
|
||||
):
|
||||
create_ft_notification_status(bst_date=date(2018, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2018, 3, 1),
|
||||
service=sample_template.service,
|
||||
template=sample_template,
|
||||
notification_status='delivered',
|
||||
@@ -579,28 +579,28 @@ def test_get_total_notifications_for_date_range(sample_service):
|
||||
template_sms = create_template(service=sample_service, template_type='sms', template_name='a')
|
||||
template_email = create_template(service=sample_service, template_type='email', template_name='b')
|
||||
template_letter = create_template(service=sample_service, template_type='letter', template_name='c')
|
||||
create_ft_notification_status(bst_date=date(2021, 2, 28),
|
||||
create_ft_notification_status(local_date=date(2021, 2, 28),
|
||||
service=template_email.service,
|
||||
template=template_email,
|
||||
count=15)
|
||||
create_ft_notification_status(bst_date=date(2021, 2, 28),
|
||||
create_ft_notification_status(local_date=date(2021, 2, 28),
|
||||
service=template_sms.service,
|
||||
template=template_sms,
|
||||
count=20)
|
||||
create_ft_notification_status(bst_date=date(2021, 2, 28),
|
||||
create_ft_notification_status(local_date=date(2021, 2, 28),
|
||||
service=template_letter.service,
|
||||
template=template_letter,
|
||||
count=3)
|
||||
|
||||
create_ft_notification_status(bst_date=date(2021, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2021, 3, 1),
|
||||
service=template_email.service,
|
||||
template=template_email,
|
||||
count=15)
|
||||
create_ft_notification_status(bst_date=date(2021, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2021, 3, 1),
|
||||
service=template_sms.service,
|
||||
template=template_sms,
|
||||
count=20)
|
||||
create_ft_notification_status(bst_date=date(2021, 3, 1),
|
||||
create_ft_notification_status(local_date=date(2021, 3, 1),
|
||||
service=template_letter.service,
|
||||
template=template_letter,
|
||||
count=3)
|
||||
@@ -633,5 +633,5 @@ def test_update_fact_notification_status_respects_gmt_bst(
|
||||
|
||||
assert FactNotificationStatus.query.filter_by(
|
||||
service_id=sample_service.id,
|
||||
bst_date=process_day
|
||||
local_date=process_day
|
||||
).count() == expected_count
|
||||
|
||||
Reference in New Issue
Block a user