From 233b964b996b70f6f9bedd535dbf335c6288f033 Mon Sep 17 00:00:00 2001 From: Demesmaeker Date: Wed, 14 Jun 2023 08:00:19 +0000 Subject: [PATCH] [FIX] sale_loyalty: ensure the test works around midnight Fix nightly fails closes odoo/odoo#124962 Signed-off-by: Antoine Vandevenne (anv) --- addons/sale_loyalty/tests/test_program_rules.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/sale_loyalty/tests/test_program_rules.py b/addons/sale_loyalty/tests/test_program_rules.py index a53db3c2246..72de181c7df 100644 --- a/addons/sale_loyalty/tests/test_program_rules.py +++ b/addons/sale_loyalty/tests/test_program_rules.py @@ -2,6 +2,7 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, timedelta +from freezegun import freeze_time from odoo import Command from odoo.addons.sale_loyalty.tests.common import TestSaleCouponCommon @@ -207,6 +208,7 @@ class TestProgramRules(TestSaleCouponCommon): self.assertEqual(len(discounts), 1, "The order should contains the Product A line and a discount") self.assertTrue('Discount: 10% on your order' in discounts.pop(), "The discount should be a 10% discount") + @freeze_time('2011-11-02 09:00:21') def test_program_rules_validity_dates(self): # Test date_to (no date_from) today = date.today()