Skip to content

Commit

Permalink
fixup! [IMP] account_edi_simple_pdf: increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hbrunn committed Dec 4, 2024
1 parent fb79334 commit 225fd58
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions account_edi_simple_pdf/tests/test_invoice_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import base64

from odoo import fields
from odoo import exceptions, fields
from odoo.tests.common import TransactionCase, tagged
from odoo.tools import file_open, float_compare

Expand Down Expand Up @@ -545,7 +545,15 @@ def _complete_import_specific_method(self, method):

def test_specific_python_methods(self):
self._complete_import_specific_method("pypdf")
self._complete_import_specific_method("pymupdf")
self._complete_import_specific_method("pdftotext.cmd")
with self.assertRaisesRegex(exceptions.UserError, "with the method pymupdf"):
self._complete_import_specific_method("pymupdf")
with self.assertRaisesRegex(
exceptions.UserError, "with the method pdftotext.lib"
):
self._complete_import_specific_method("pdftotext.lib")
with self.assertRaisesRegex(exceptions.UserError, "invalid value"):
self._complete_import_specific_method("invalid")

def test_test_run(self):
"""
Expand Down

0 comments on commit 225fd58

Please sign in to comment.