diff --git a/addons/account_followup/tests/test_account_followup.py b/addons/account_followup/tests/test_account_followup.py index f60f4d5a98c..804089f9093 100644 --- a/addons/account_followup/tests/test_account_followup.py +++ b/addons/account_followup/tests/test_account_followup.py @@ -53,7 +53,7 @@ class TestAccountFollowup(TransactionCase): def test_00_send_followup_after_3_days(self): """ Send follow up after 3 days and check nothing is done (as first follow-up level is only after 15 days)""" cr, uid = self.cr, self.uid - current_date = datetime.datetime.now() + current_date = datetime.datetime.utcnow() delta = datetime.timedelta(days=3) result = current_date + delta self.wizard_id = self.wizard.create(cr, uid, {'date':result.strftime("%Y-%m-%d"), @@ -84,14 +84,14 @@ class TestAccountFollowup(TransactionCase): def test_01_send_followup_later_for_upgrade(self): """ Send one follow-up after 15 days to check it upgrades to level 1""" cr, uid = self.cr, self.uid - current_date = datetime.datetime.now() + current_date = datetime.datetime.utcnow() delta = datetime.timedelta(days=15) result = current_date + delta self.wizard_id = self.wizard.create(cr, uid, { 'date':result.strftime("%Y-%m-%d"), 'followup_id': self.followup_id }, context={"followup_id": self.followup_id}) - self.wizard.do_process(cr, uid, [self.wizard_id], context={"followup_id": self.followup_id}) + self.wizard.do_process(cr, uid, [self.wizard_id], context={"followup_id": self.followup_id, 'tz':'UTC'}) self.assertEqual(self.partner.browse(cr, uid, self.partner_id).latest_followup_level_id.id, self.first_followup_line_id, "Not updated to the correct follow-up level") @@ -107,7 +107,7 @@ class TestAccountFollowup(TransactionCase): def test_03_filter_on_credit(self): """ Check the partners can be filtered on having credits """ cr, uid = self.cr, self.uid - ids = self.partner.search(cr, uid, [('payment_amount_due', '>=', 0.0)]) + ids = self.partner.search(cr, uid, [('payment_amount_due', '>', 0.0)]) self.assertIn(self.partner_id, ids) def test_04_action_done(self): @@ -139,7 +139,7 @@ class TestAccountFollowup(TransactionCase): """Run wizard until manual action, pay the invoice and check that partner has no follow-up level anymore and after running the wizard the action is empty""" cr, uid = self.cr, self.uid self.test_02_check_manual_action() - current_date = datetime.datetime.now() + current_date = datetime.datetime.utcnow() delta = datetime.timedelta(days=1) result = current_date + delta self.invoice.pay_and_reconcile(cr, uid, [self.invoice_id], 1000.0, self.pay_account_id,