update time handling for more tests

This commit is contained in:
stvnrlly
2022-11-10 16:54:48 -05:00
parent b50cb4712f
commit 3528bd37e1
10 changed files with 43 additions and 43 deletions

View File

@@ -2162,10 +2162,10 @@ def test_get_detailed_services_includes_services_with_no_notifications(notify_db
def test_get_detailed_services_only_includes_todays_notifications(sample_template):
from app.service.rest import get_detailed_services
create_notification(sample_template, created_at=datetime(2015, 10, 9, 23, 59))
create_notification(sample_template, created_at=datetime(2015, 10, 10, 0, 0))
create_notification(sample_template, created_at=datetime(2015, 10, 10, 3, 59))
create_notification(sample_template, created_at=datetime(2015, 10, 10, 4, 0))
create_notification(sample_template, created_at=datetime(2015, 10, 10, 12, 0))
create_notification(sample_template, created_at=datetime(2015, 10, 10, 23, 0))
create_notification(sample_template, created_at=datetime(2015, 10, 11, 3, 0))
with freeze_time('2015-10-10T12:00:00'):
data = get_detailed_services(start_date=datetime.utcnow().date(), end_date=datetime.utcnow().date())