From d911054306d12c0dbdd69d89da9a553923544a09 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 20 Apr 2023 09:12:17 +0200 Subject: [PATCH] [IMP] base_comment_template: Avoid to load full language in tests There's no need of loading each of the modules' translations, speeding up this test execution a lot. --- base_comment_template/tests/test_base_comment_template.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/base_comment_template/tests/test_base_comment_template.py b/base_comment_template/tests/test_base_comment_template.py index e54169e4c..a3195b3da 100644 --- a/base_comment_template/tests/test_base_comment_template.py +++ b/base_comment_template/tests/test_base_comment_template.py @@ -3,7 +3,6 @@ # Copyright 2023 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests import common -from odoo.tools.misc import mute_logger from .fake_models import ResUsers, setup_test_model, teardown_test_model @@ -94,12 +93,7 @@ class TestCommentTemplate(common.SavepointCase): ) def test_render_comment_text_(self): - with mute_logger("odoo.addons.base.models.ir_translation"): - self.env["base.language.install"].create( - {"lang": "ro_RO", "overwrite": True} - ).lang_install() - with mute_logger("odoo.tools.translate"): - self.env["base.update.translations"].create({"lang": "ro_RO"}).act_update() + self.env["res.lang"]._activate_lang("ro_RO") partner_title = self.ResPartnerTitle.create( {"name": "Ambassador", "shortcut": "Amb."} )