|
7 | 7 |
|
8 | 8 | from ..resources import get_test_resource_path |
9 | 9 |
|
10 | | -WARNING_NO_XFA_FORMS = ( |
11 | | - "No XFA forms were detected in the input PDF. No output was produced." |
12 | | -) |
13 | | - |
14 | 10 |
|
15 | 11 | @pytest.fixture(scope="module") |
16 | 12 | def uploaded_pdf_for_acroforms( |
17 | 13 | pdfrest_api_key: str, |
18 | 14 | pdfrest_live_base_url: str, |
19 | 15 | ) -> PdfRestFile: |
20 | | - resource = get_test_resource_path("report.pdf") |
| 16 | + resource = get_test_resource_path("xfa.pdf") |
21 | 17 | with PdfRestClient( |
22 | 18 | api_key=pdfrest_api_key, |
23 | 19 | base_url=pdfrest_live_base_url, |
@@ -49,11 +45,7 @@ def test_live_convert_xfa_to_acroforms_success( |
49 | 45 | response = client.convert_xfa_to_acroforms(uploaded_pdf_for_acroforms, **kwargs) |
50 | 46 |
|
51 | 47 | 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 |
57 | 49 | assert response.output_files |
58 | 50 | output_file = response.output_file |
59 | 51 | assert output_file.type == "application/pdf" |
@@ -109,11 +101,7 @@ async def test_live_async_convert_xfa_to_acroforms_success( |
109 | 101 | ) |
110 | 102 |
|
111 | 103 | 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 |
117 | 105 | assert response.output_files |
118 | 106 | output_file = response.output_file |
119 | 107 | if output_name is not None: |
|
0 commit comments