From d4c2a2b284f4487797fb1491b522eaca66a0f332 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Thu, 26 Sep 2019 11:54:22 +0100 Subject: [PATCH] fix failing test it failed after 5:30pm. pin the time to 4am, when the task actually runs --- .../test_notification_dao_delete_notifications.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/app/dao/notification_dao/test_notification_dao_delete_notifications.py b/tests/app/dao/notification_dao/test_notification_dao_delete_notifications.py index a1b80c750..8856defc8 100644 --- a/tests/app/dao/notification_dao/test_notification_dao_delete_notifications.py +++ b/tests/app/dao/notification_dao/test_notification_dao_delete_notifications.py @@ -132,6 +132,7 @@ def test_delete_notifications_for_days_of_retention(sample_service, notification mock_get_s3.assert_not_called() +@freeze_time('2019-09-01 04:30') def test_delete_notifications_deletes_letters_from_s3(sample_letter_template, mocker): mock_get_s3 = mocker.patch("app.dao.notifications_dao.get_s3_bucket_objects") eight_days_ago = datetime.utcnow() - timedelta(days=8)