From a65c4c6cbf0c43279f5de451afefbc1a9ff0d29c Mon Sep 17 00:00:00 2001 From: josep-tecnativa Date: Tue, 17 Oct 2023 12:06:40 +0200 Subject: [PATCH] [IMP] product_brand: test performance improvement - Include context keys for avoiding mail operations overhead. --- product_brand/tests/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/product_brand/tests/common.py b/product_brand/tests/common.py index 5ec85e054..c0c17c2a0 100644 --- a/product_brand/tests/common.py +++ b/product_brand/tests/common.py @@ -5,12 +5,14 @@ from odoo.tests.common import TransactionCase +from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT + class CommonCase(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.product = cls.env.ref("product.product_product_4") cls.supplier = cls.env.ref("base.res_partner_2") cls.product_brand_obj = cls.env["product.brand"]