From fb9c2edadd7ac8d4464f187574374dc4abdcff6e Mon Sep 17 00:00:00 2001 From: josep-tecnativa Date: Mon, 16 Oct 2023 11:09:33 +0200 Subject: [PATCH] [IMP] account_bank_statement_reopen_skip_undo_reconciliation: test performance improvement - Create setUpClass method - Include context keys for avoiding mail operations overhead. --- .../tests/test_account_bank_statement.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/account_bank_statement_reopen_skip_undo_reconciliation/tests/test_account_bank_statement.py b/account_bank_statement_reopen_skip_undo_reconciliation/tests/test_account_bank_statement.py index 539aefd7..7e6f1609 100644 --- a/account_bank_statement_reopen_skip_undo_reconciliation/tests/test_account_bank_statement.py +++ b/account_bank_statement_reopen_skip_undo_reconciliation/tests/test_account_bank_statement.py @@ -11,6 +11,20 @@ from odoo.addons.account.tests.test_account_bank_statement import ( @tagged("post_install", "-at_install") class TestAccountBankStatementLine(TestAccountBankStatementCommon): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env( + context=dict( + cls.env.context, + mail_create_nolog=True, + mail_create_nosubscribe=True, + mail_notrack=True, + no_reset_password=True, + tracking_disable=True, + ) + ) + def test_button_undo_reconciliation(self): statement = self.env["account.bank.statement"].create( {