From 84aabd001e82de182b1437a673d50275ce22efc2 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 19 Nov 2020 12:47:05 +0000 Subject: [PATCH] [FIX] test_translation_import: side effect between test methods One test method was setting `env.context` instead of creating a new environment. --- odoo/addons/test_translation_import/tests/test_term_count.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/test_translation_import/tests/test_term_count.py b/odoo/addons/test_translation_import/tests/test_term_count.py index 38f1e7a75fa..538b97bb635 100644 --- a/odoo/addons/test_translation_import/tests/test_term_count.py +++ b/odoo/addons/test_translation_import/tests/test_term_count.py @@ -176,7 +176,7 @@ class TestTermCount(common.TransactionCase): trans_count = self.env['ir.translation'].search_count([('lang', '=', 'tlh')]) self.assertEqual(trans_count, 1, "The imported translations were not created") - self.env.context = dict(self.env.context, lang="tlh") + self.env = self.env(context=dict(self.env.context, lang="tlh")) self.assertEqual(_("Klingon"), "tlhIngan", "The code translation was not applied") def test_lazy_translation(self):