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):