From d27d400f530e9f780a7fd76d92456ddc811983a1 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 21 Jan 2020 14:15:48 +0000 Subject: [PATCH] Test the boundary conditions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since date math can be hard it’s good to test as close to the boundary as possible, which hopefully catches stuff like timezone related bugs. --- tests/app/main/views/test_jobs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index 1160a337c..25a79afdf 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -344,8 +344,12 @@ def test_should_show_job_without_notifications( (datetime(2020, 1, 1, 0, 0, 0), datetime(2020, 1, 10, 0, 0, 1), ( 'No messages to show yet…' )), - # Created a while ago, started a couple of days ago - (datetime(2020, 1, 1, 0, 0, 0), datetime(2020, 1, 8, 0, 0, 1), ( + # Created a while ago, started just within the last 24h + (datetime(2020, 1, 1, 0, 0, 0), datetime(2020, 1, 9, 1, 0, 1), ( + 'No messages to show yet…' + )), + # Created a while ago, started exactly 24h ago + (datetime(2020, 1, 1, 0, 0, 0), datetime(2020, 1, 9, 1, 0, 0), ( 'These messages have been deleted because they were sent more than 7 days ago' )), ))