Skip to content

Commit

Permalink
tests of auto detecting a XRechnung v2 and v3 profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
MAKOMO committed Jan 6, 2024
1 parent f037791 commit f8c3518
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions tests/test_mininal.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ def test_readme_construction_example_pdf17(invoice_document, invoice_pdf17_bytes
output_pdf = attach_xml(invoice_pdf17_bytes, xml)

assert output_pdf

@pytest.mark.parametrize("invoice_document", ["380"], indirect=True)
def test_readme_construction_example_pdf17_xrechnung2(invoice_document, invoice_pdf17_bytes):
"""
Test using a PDF 1.7 version in order to cover the output intents handling
"""
doc = invoice_document
doc.context.guideline_parameter.id = (
"urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.3"
)
xml = doc.serialize(schema="FACTUR-X_EXTENDED")
output_pdf = attach_xml(invoice_pdf17_bytes, xml)

assert output_pdf

@pytest.mark.parametrize("invoice_document", ["380"], indirect=True)
def test_readme_construction_example_pdf17_xrechnung3(invoice_document, invoice_pdf17_bytes):
"""
Test using a PDF 1.7 version in order to cover the output intents handling
"""
doc = invoice_document
doc.context.guideline_parameter.id = (
"urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0"
)
xml = doc.serialize(schema="FACTUR-X_EXTENDED")
output_pdf = attach_xml(invoice_pdf17_bytes, xml)

assert output_pdf


@pytest.mark.parametrize("invoice_document", ["220"], indirect=True)
Expand Down

0 comments on commit f8c3518

Please sign in to comment.