mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-21 14:59:26 -04:00
migrate bst_date to local_date
This commit is contained in:
@@ -191,8 +191,8 @@ def test_get_live_services_data(sample_user, admin_request):
|
||||
sms_template = create_template(service=service)
|
||||
email_template = create_template(service=service, template_type='email')
|
||||
dao_add_service_to_organisation(service=service, organisation_id=org.id)
|
||||
create_ft_billing(bst_date='2019-04-20', template=sms_template)
|
||||
create_ft_billing(bst_date='2019-04-20', template=email_template)
|
||||
create_ft_billing(local_date='2019-04-20', template=sms_template)
|
||||
create_ft_billing(local_date='2019-04-20', template=email_template)
|
||||
|
||||
create_annual_billing(service.id, 1, 2019)
|
||||
create_annual_billing(service_2.id, 2, 2018)
|
||||
@@ -2188,13 +2188,13 @@ def test_get_detailed_services_only_includes_todays_notifications(sample_templat
|
||||
def test_get_detailed_services_for_date_range(sample_template, start_date_delta, end_date_delta):
|
||||
from app.service.rest import get_detailed_services
|
||||
|
||||
create_ft_notification_status(bst_date=(datetime.utcnow() - timedelta(days=3)).date(),
|
||||
create_ft_notification_status(local_date=(datetime.utcnow() - timedelta(days=3)).date(),
|
||||
service=sample_template.service,
|
||||
notification_type='sms')
|
||||
create_ft_notification_status(bst_date=(datetime.utcnow() - timedelta(days=2)).date(),
|
||||
create_ft_notification_status(local_date=(datetime.utcnow() - timedelta(days=2)).date(),
|
||||
service=sample_template.service,
|
||||
notification_type='sms')
|
||||
create_ft_notification_status(bst_date=(datetime.utcnow() - timedelta(days=1)).date(),
|
||||
create_ft_notification_status(local_date=(datetime.utcnow() - timedelta(days=1)).date(),
|
||||
service=sample_template.service,
|
||||
notification_type='sms')
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ def test_get_template_usage_by_month_returns_correct_data(
|
||||
admin_request,
|
||||
sample_template
|
||||
):
|
||||
create_ft_notification_status(bst_date=date(2017, 4, 2), template=sample_template, count=3)
|
||||
create_ft_notification_status(local_date=date(2017, 4, 2), template=sample_template, count=3)
|
||||
create_notification(sample_template, created_at=datetime.utcnow())
|
||||
|
||||
resp_json = admin_request.get(
|
||||
@@ -61,8 +61,8 @@ def test_get_template_usage_by_month_returns_two_templates(admin_request, sample
|
||||
template_name=PRECOMPILED_TEMPLATE_NAME,
|
||||
hidden=True
|
||||
)
|
||||
create_ft_notification_status(bst_date=datetime(2017, 4, 2), template=template_one, count=1)
|
||||
create_ft_notification_status(bst_date=datetime(2017, 4, 2), template=sample_template, count=3)
|
||||
create_ft_notification_status(local_date=datetime(2017, 4, 2), template=template_one, count=1)
|
||||
create_ft_notification_status(local_date=datetime(2017, 4, 2), template=sample_template, count=3)
|
||||
create_notification(sample_template, created_at=datetime.utcnow())
|
||||
|
||||
resp_json = admin_request.get(
|
||||
|
||||
Reference in New Issue
Block a user