Skip to content

Commit 23d3c8f

Browse files
Convert forms live test: Use XFA input
1 parent 95ba010 commit 23d3c8f

2 files changed

Lines changed: 3 additions & 15 deletions

File tree

tests/live/test_live_convert_xfa_to_acroforms.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@
77

88
from ..resources import get_test_resource_path
99

10-
WARNING_NO_XFA_FORMS = (
11-
"No XFA forms were detected in the input PDF. No output was produced."
12-
)
13-
1410

1511
@pytest.fixture(scope="module")
1612
def uploaded_pdf_for_acroforms(
1713
pdfrest_api_key: str,
1814
pdfrest_live_base_url: str,
1915
) -> PdfRestFile:
20-
resource = get_test_resource_path("report.pdf")
16+
resource = get_test_resource_path("xfa.pdf")
2117
with PdfRestClient(
2218
api_key=pdfrest_api_key,
2319
base_url=pdfrest_live_base_url,
@@ -49,11 +45,7 @@ def test_live_convert_xfa_to_acroforms_success(
4945
response = client.convert_xfa_to_acroforms(uploaded_pdf_for_acroforms, **kwargs)
5046

5147
assert str(response.input_id) == str(uploaded_pdf_for_acroforms.id)
52-
if response.warning is not None:
53-
assert response.warning == WARNING_NO_XFA_FORMS
54-
assert response.output_files == []
55-
return
56-
48+
assert response.warning is None
5749
assert response.output_files
5850
output_file = response.output_file
5951
assert output_file.type == "application/pdf"
@@ -109,11 +101,7 @@ async def test_live_async_convert_xfa_to_acroforms_success(
109101
)
110102

111103
assert str(response.input_id) == str(uploaded_pdf_for_acroforms.id)
112-
if response.warning is not None:
113-
assert response.warning == WARNING_NO_XFA_FORMS
114-
assert response.output_files == []
115-
return
116-
104+
assert response.warning is None
117105
assert response.output_files
118106
output_file = response.output_file
119107
if output_name is not None:

tests/resources/xfa.pdf

188 KB
Binary file not shown.

0 commit comments

Comments
 (0)