[FIX] sale_loyalty: ensure the test works around midnight

Fix nightly fails

closes odoo/odoo#124962

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Demesmaeker
2023-06-14 13:10:40 +02:00
parent c77373892b
commit 233b964b99
@@ -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()