diff --git a/account_banking_sepa_credit_transfer/tests/test_sct.py b/account_banking_sepa_credit_transfer/tests/test_sct.py index 6d78d78825d..ec5a981c350 100644 --- a/account_banking_sepa_credit_transfer/tests/test_sct.py +++ b/account_banking_sepa_credit_transfer/tests/test_sct.py @@ -9,16 +9,14 @@ from lxml import etree from odoo.exceptions import UserError -from odoo.tests.common import TransactionCase -from odoo.addons.base.tests.common import DISABLED_MAIL_CONTEXT +from odoo.addons.base.tests.common import BaseCommon -class TestSCT(TransactionCase): +class TestSCT(BaseCommon): @classmethod def setUpClass(cls): super().setUpClass() - cls.env = cls.env(context=dict(cls.env.context, **DISABLED_MAIL_CONTEXT)) cls.account_model = cls.env["account.account"] cls.move_model = cls.env["account.move"] cls.journal_model = cls.env["account.journal"] @@ -28,9 +26,9 @@ def setUpClass(cls): cls.attachment_model = cls.env["ir.attachment"] cls.invoice_model = cls.env["account.move"] cls.invoice_line_model = cls.env["account.move.line"] - cls.partner_agrolait = cls.env.ref("base.res_partner_2") - cls.partner_asus = cls.env.ref("base.res_partner_1") - cls.partner_c2c = cls.env.ref("base.res_partner_12") + cls.partner_agrolait = cls.env["res.partner"].create({"name": "Agrolait"}) + cls.partner_asus = cls.env["res.partner"].create({"name": "Asus"}) + cls.partner_c2c = cls.env["res.partner"].create({"name": "C2C"}) cls.eur_currency = cls.env.ref("base.EUR") cls.eur_currency.active = True cls.usd_currency = cls.env.ref("base.USD")