From fd95a3fa6f5311b713944c8bbe522433239006e7 Mon Sep 17 00:00:00 2001 From: eduezerouali-tecnativa Date: Wed, 16 Sep 2026 08:55:52 +0200 Subject: [PATCH 1/3] [FIX] website_event_filter_city: freeze_time test to avoid event not showing once that date passes. --- website_event_filter_city/tests/test_ui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website_event_filter_city/tests/test_ui.py b/website_event_filter_city/tests/test_ui.py index 40c18688d..67a1a437f 100644 --- a/website_event_filter_city/tests/test_ui.py +++ b/website_event_filter_city/tests/test_ui.py @@ -1,6 +1,8 @@ # Copyright 2016 Tecnativa - Jairo Llopis # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +from freezegun import freeze_time + from odoo.tests.common import HttpCase, new_test_user, tagged @@ -44,6 +46,7 @@ def setUpClass(cls): password="testuser", ) + @freeze_time("2026-09-14 12:00:00") def test_ui_website(self): """Test frontend tour.""" self.start_tour("/event", "website_event_filter_city", login="test-user") From 0d1007f3186e5de62e69161909114c5d4d1595c9 Mon Sep 17 00:00:00 2001 From: eduezerouali-tecnativa Date: Wed, 16 Sep 2026 08:55:52 +0200 Subject: [PATCH 2/3] [FIX] website_event_filter_city: fix dates on test so they are not hardcode --- website_event_filter_city/tests/test_ui.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/website_event_filter_city/tests/test_ui.py b/website_event_filter_city/tests/test_ui.py index 67a1a437f..b93f83201 100644 --- a/website_event_filter_city/tests/test_ui.py +++ b/website_event_filter_city/tests/test_ui.py @@ -1,9 +1,7 @@ # Copyright 2016 Tecnativa - Jairo Llopis # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from freezegun import freeze_time - -from odoo.tests.common import HttpCase, new_test_user, tagged +from odoo.tests.common import HttpCase, freeze_time, new_test_user, tagged @tagged("post_install", "-at_install") From 49af682ef3df300a848f00f6d75db955f2a35293 Mon Sep 17 00:00:00 2001 From: eduezerouali-tecnativa Date: Wed, 16 Sep 2026 08:55:52 +0200 Subject: [PATCH 3/3] [FIX] website_event_filter_city: fix dates on test so they are not hardcode --- website_event_filter_city/tests/test_ui.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/website_event_filter_city/tests/test_ui.py b/website_event_filter_city/tests/test_ui.py index b93f83201..408595824 100644 --- a/website_event_filter_city/tests/test_ui.py +++ b/website_event_filter_city/tests/test_ui.py @@ -1,7 +1,10 @@ # Copyright 2016 Tecnativa - Jairo Llopis # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo.tests.common import HttpCase, freeze_time, new_test_user, tagged +from datetime import timedelta + +from odoo import fields +from odoo.tests.common import HttpCase, new_test_user, tagged @tagged("post_install", "-at_install") @@ -27,8 +30,8 @@ def setUpClass(cls): event = cls.env["event.event"].create( { "name": "My Event Test", - "date_begin": "2026-09-15 10:00:00", - "date_end": "2026-09-15 18:00:00", + "date_begin": fields.Datetime.now() + timedelta(days=1), + "date_end": fields.Datetime.now() + timedelta(days=1, hours=8), "date_tz": "Atlantic/Canary", "user_id": cls.env.user.id, "address_id": location.id, @@ -44,7 +47,6 @@ def setUpClass(cls): password="testuser", ) - @freeze_time("2026-09-14 12:00:00") def test_ui_website(self): """Test frontend tour.""" self.start_tour("/event", "website_event_filter_city", login="test-user")