Skip to content

Commit dec30bb

Browse files
awalker4claude
andcommitted
test(none): pass input_files in the custom DAG job integration test
The Platform API now rejects job creation with no input source, so the custom DAG job test fails with a 400. Attach a sample PDF the same way test_workflow_lifecycle already does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent cb867f0 commit dec30bb

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

‎_test_unstructured_client/integration/test_platform_workflow_lifecycle.py‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ def test_workflow_lifecycle(
224224
assert delete_response.status_code in [200, 204]
225225

226226

227-
def test_workflow_lifecycle_with_custom_dag_job(platform_client: UnstructuredClient):
227+
def test_workflow_lifecycle_with_custom_dag_job(
228+
platform_client: UnstructuredClient,
229+
doc_path: Path,
230+
):
228231
"""
229232
Test creating a job with a custom DAG (ephemeral job type).
230233
"""
@@ -253,12 +256,22 @@ def test_workflow_lifecycle_with_custom_dag_job(platform_client: UnstructuredCli
253256
request_data = json.dumps({
254257
"job_nodes": custom_nodes,
255258
})
256-
259+
260+
pdf_filename = "layout-parser-paper-fast.pdf"
261+
pdf_content = (doc_path / pdf_filename).read_bytes()
262+
257263
create_job_response = call_with_rate_limit_retry(
258264
platform_client.jobs.create_job,
259265
request=operations.CreateJobRequest(
260266
body_create_job=shared.BodyCreateJob(
261267
request_data=request_data,
268+
input_files=[
269+
shared.InputFiles(
270+
content=pdf_content,
271+
file_name=pdf_filename,
272+
content_type="application/pdf",
273+
)
274+
],
262275
)
263276
)
264277
)

0 commit comments

Comments
 (0)