From dec30bb4a27df43860e9ac793665f58ab332ddc2 Mon Sep 17 00:00:00 2001 From: Austin Walker Date: Thu, 24 Sep 2026 21:05:01 -0400 Subject: [PATCH] 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 --- .../test_platform_workflow_lifecycle.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/_test_unstructured_client/integration/test_platform_workflow_lifecycle.py b/_test_unstructured_client/integration/test_platform_workflow_lifecycle.py index 8e721272..516a8aaa 100644 --- a/_test_unstructured_client/integration/test_platform_workflow_lifecycle.py +++ b/_test_unstructured_client/integration/test_platform_workflow_lifecycle.py @@ -224,7 +224,10 @@ def test_workflow_lifecycle( assert delete_response.status_code in [200, 204] -def test_workflow_lifecycle_with_custom_dag_job(platform_client: UnstructuredClient): +def test_workflow_lifecycle_with_custom_dag_job( + platform_client: UnstructuredClient, + doc_path: Path, +): """ Test creating a job with a custom DAG (ephemeral job type). """ @@ -253,12 +256,22 @@ def test_workflow_lifecycle_with_custom_dag_job(platform_client: UnstructuredCli request_data = json.dumps({ "job_nodes": custom_nodes, }) - + + pdf_filename = "layout-parser-paper-fast.pdf" + pdf_content = (doc_path / pdf_filename).read_bytes() + create_job_response = call_with_rate_limit_retry( platform_client.jobs.create_job, request=operations.CreateJobRequest( body_create_job=shared.BodyCreateJob( request_data=request_data, + input_files=[ + shared.InputFiles( + content=pdf_content, + file_name=pdf_filename, + content_type="application/pdf", + ) + ], ) ) )