From be6202c0aea72020cf41a3bb39f8825d2b30b684 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 16 May 2024 13:51:37 +0200 Subject: [PATCH] [17.0][FIX] l10n_es_account_statement_import_n43: use file_path instead of get_module_resource in tests --- .../test_l10n_es_account_bank_statement_import_n43.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/l10n_es_account_statement_import_n43/tests/test_l10n_es_account_bank_statement_import_n43.py b/l10n_es_account_statement_import_n43/tests/test_l10n_es_account_bank_statement_import_n43.py index b6f45bc9f20..ffcac279b0d 100644 --- a/l10n_es_account_statement_import_n43/tests/test_l10n_es_account_bank_statement_import_n43.py +++ b/l10n_es_account_statement_import_n43/tests/test_l10n_es_account_bank_statement_import_n43.py @@ -4,8 +4,8 @@ import base64 from odoo import fields -from odoo.modules.module import get_module_resource from odoo.tests import common +from odoo.tools.misc import file_path class L10nEsAccountStatementImportN43(common.TransactionCase): @@ -51,9 +51,7 @@ def setUpClass(cls): "currency_id": eur_currency.id, } ) - n43_file_path = get_module_resource( - "l10n_es_account_statement_import_n43", "tests", "test.n43" - ) + n43_file_path = file_path("l10n_es_account_statement_import_n43/tests/test.n43") n43_file = base64.b64encode(open(n43_file_path, "rb").read()) cls.import_wizard = ( cls.env["account.statement.import"] @@ -62,8 +60,8 @@ def setUpClass(cls): ) def test_import_n43_multi(self): - n43_file_path = get_module_resource( - "l10n_es_account_statement_import_n43", "tests", "testmulti.n43" + n43_file_path = file_path( + "l10n_es_account_statement_import_n43/tests/testmulti.n43" ) n43_file = base64.b64encode(open(n43_file_path, "rb").read()) self.import_wizard.statement_file = n43_file