From 9349085edc287d9e5f6545156db3817e53ee3485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20S=C3=A9bille?= Date: Mon, 23 Dec 2024 19:52:59 +0100 Subject: [PATCH] tests: Fix a flaky test around midnight Test cases and assertion in this file are setup to be in UTC timezone, but the `expired` trait use the one in the settings (`Europe/Paris`) so around midnight we don't always get the same date. --- tests/metabase/management/test_populate_metabase_emplois.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/metabase/management/test_populate_metabase_emplois.py b/tests/metabase/management/test_populate_metabase_emplois.py index 37da8ee2e3..2cbda71718 100644 --- a/tests/metabase/management/test_populate_metabase_emplois.py +++ b/tests/metabase/management/test_populate_metabase_emplois.py @@ -309,7 +309,7 @@ def test_populate_job_seekers(): 1, 1, 1, - job_application_2.eligibility_diagnosis.created_at.date(), + timezone.localdate(job_application_2.eligibility_diagnosis.created_at, timezone=datetime.UTC), job_application_2.eligibility_diagnosis.expires_at, 0, job_application_2.eligibility_diagnosis.author_prescriber_organization.id,