From a431ee3f5228fc4120485a8b1c577e77aed7c19c Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Mon, 19 Oct 2020 08:45:38 +0000 Subject: [PATCH] [FIX] calendar: use a contextual timestamp in test When the test starts after 00:00:00 UTC, the test fails. closes odoo/odoo#60891 X-original-commit: c62acb48ac3ae11180a6817321664fb01833d3bd Signed-off-by: Yannick Tivisse (yti) Signed-off-by: Christophe Monniez (moc) --- addons/calendar/tests/test_calendar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/calendar/tests/test_calendar.py b/addons/calendar/tests/test_calendar.py index a7a0988b4c0..860637e6c86 100644 --- a/addons/calendar/tests/test_calendar.py +++ b/addons/calendar/tests/test_calendar.py @@ -274,7 +274,7 @@ class TestCalendar(SavepointCaseWithUserDemo): self.env['res.partner'].create({'name': 'testuser1', 'email': u'alice@example.com'}), ] partner_ids = [(6, False, [p.id for p in partners]),] - now = fields.Datetime.now() + now = fields.Datetime.context_timestamp(partners[0], fields.Datetime.now()) m = self.CalendarEvent.create({ 'name': "mailTest1", 'allday': False,