From 365ea506a6fbe321cae54cf15b3c6d6ed76b0eff Mon Sep 17 00:00:00 2001 From: josep-tecnativa Date: Mon, 16 Oct 2023 12:33:02 +0200 Subject: [PATCH] [IMP] account_payment_partner: test performance improvement - Include context keys for avoiding mail operations overhead. --- account_payment_partner/tests/test_account_payment_partner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account_payment_partner/tests/test_account_payment_partner.py b/account_payment_partner/tests/test_account_payment_partner.py index 517746b27..ec8dcf20d 100644 --- a/account_payment_partner/tests/test_account_payment_partner.py +++ b/account_payment_partner/tests/test_account_payment_partner.py @@ -7,12 +7,14 @@ from odoo.exceptions import UserError, ValidationError from odoo.fields import Date from odoo.tests.common import Form, TransactionCase +from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT + class TestAccountPaymentPartner(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() - cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT)) cls.res_users_model = cls.env["res.users"] cls.move_model = cls.env["account.move"]