From 390b852cfb6dd8bdbdea02223afc435977f46e2a Mon Sep 17 00:00:00 2001 From: Petr Jasek Date: Tue, 6 Feb 2024 13:45:47 +0100 Subject: [PATCH] fix flaky test --- server/planning/events/events_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/planning/events/events_tests.py b/server/planning/events/events_tests.py index 7da297ccf..bf393a081 100644 --- a/server/planning/events/events_tests.py +++ b/server/planning/events/events_tests.py @@ -531,4 +531,4 @@ def test_planning_item_is_published_with_events(self): planning_item = planning_service.find_one(req=None, _id=planning_id[0]) self.assertEqual(len([planning_item]), 1) self.assertEqual(planning_item.get("state"), "scheduled") - self.assertEqual(planning_item.get("versionposted"), now) + assert now <= planning_item.get("versionposted") < now + timedelta(seconds=5)