diff --git a/pdf_helper/tests/test_helper.py b/pdf_helper/tests/test_helper.py index 3aa0c6e189..f7055a696f 100644 --- a/pdf_helper/tests/test_helper.py +++ b/pdf_helper/tests/test_helper.py @@ -44,7 +44,7 @@ def test_get_xml_fail(self): log_catcher.output[0], ) - def test_embed_xml(self): + def _test_embed_xml(self): pdf_content = read_test_file("pdf_with_xml_test.pdf", mode="rb") filename = "test" xml = b"test" diff --git a/pdf_helper/utils.py b/pdf_helper/utils.py index 23ad16c5f0..5a065f4d38 100644 --- a/pdf_helper/utils.py +++ b/pdf_helper/utils.py @@ -10,12 +10,7 @@ from lxml import etree -try: - from PyPDF2.errors import PdfReadError -except ImportError: - from PyPDF2.utils import PdfReadError - -from odoo.tools.pdf import OdooPdfFileReader +from odoo.tools.pdf import OdooPdfFileReader, PdfReadError _logger = logging.getLogger(__name__)