@@ -226,21 +226,17 @@ def test_run_workflow(httpx_mock, client: UnstructuredClient, platform_api_url:
226226
227227 httpx_mock .add_response (
228228 method = "POST" ,
229- url = url ,
230229 status_code = 202 ,
230+ headers = {"Content-Type" : "application/json" },
231231 json = {
232- "created_at" : "2024-08-04T10:06:22.481Z" ,
233- "id" : "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445" ,
234- "name" : "test_workflow" ,
235- "schedule" : {"crontab_entries" : [{"cron_expression" : "0 0 * * 0" }]},
236- "sources" : ["a9593964-92eb-496f-84ac-c8f067ba24c3" ],
237- "destinations" : [
238- "aeebecc7-9d8e-4625-bf1d-815c2f084869" ,
239- ],
240- "workflow_nodes" : [],
241- "status" : "active" ,
242- "workflow_type" : "platinum" ,
232+ "created_at" : "2025-06-22T11:37:21.648Z" ,
233+ "id" : "fcdc4994-eea5-425c-91fa-e03f2bd8030d" ,
234+ "status" : "IN_PROGRESS" ,
235+ "runtime" : None ,
236+ "workflow_id" : "16b80fee-64dc-472d-8f26-1d7729b6423d" ,
237+ "workflow_name" : "test_workflow" ,
243238 },
239+ url = url ,
244240 )
245241
246242 run_workflow_response = client .workflows .run_workflow (
@@ -257,16 +253,7 @@ def test_run_workflow(httpx_mock, client: UnstructuredClient, platform_api_url:
257253 assert request .method == "POST"
258254 assert request .url == url
259255
260- workflow_run = run_workflow_response .workflow_information
261- assert workflow_run .id == "6c4f327c-7ca2-4933-a68d-2ebe9d9f1445"
262- assert workflow_run .name == "test_workflow"
263- assert workflow_run .workflow_type == "platinum"
264- assert workflow_run .status == "active"
265- assert workflow_run .created_at == datetime .fromisoformat (
266- "2024-08-04T10:06:22.481+00:00"
267- )
268- assert workflow_run .schedule == shared .WorkflowSchedule (
269- crontab_entries = [shared .crontabentry .CronTabEntry (cron_expression = "0 0 * * 0" )]
270- )
271- assert workflow_run .sources == ["a9593964-92eb-496f-84ac-c8f067ba24c3" ]
272- assert workflow_run .destinations == ["aeebecc7-9d8e-4625-bf1d-815c2f084869" ]
256+ new_job = run_workflow_response .job_information
257+ assert new_job .id == "fcdc4994-eea5-425c-91fa-e03f2bd8030d"
258+ assert new_job .workflow_name == "test_workflow"
259+ assert new_job .status == "IN_PROGRESS"
0 commit comments