From 9aba3d758bf42b8edb500e705986766b0297d03f Mon Sep 17 00:00:00 2001 From: David McDonald Date: Thu, 24 Dec 2020 09:57:52 +0000 Subject: [PATCH] Fix test that fails after 5:30pm Was failing when ran after 5:30pm as this would cause the letters to be in a different subfolder (for one day later). Solved by freezetiming it Example build that failed: https://cd.gds-reliability.engineering/builds/1876957 --- .../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 fe819d5fd..036dc95e2 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 @@ -236,6 +236,7 @@ def test_delete_notifications_deletes_letters_not_sent_and_in_final_state_from_t mock_get_s3.assert_not_called() +@freeze_time('2020-12-24 04:30') @pytest.mark.parametrize('notification_status', ['delivered', 'returned-letter', 'technical-failure']) def test_delete_notifications_deletes_letters_sent_and_in_final_state_from_table_and_s3( sample_service, mocker, notification_status