diff --git a/tests/wf_api/test_admin_api.py b/tests/wf_api/test_admin_api.py index 23ad6f2d..1dad00e5 100644 --- a/tests/wf_api/test_admin_api.py +++ b/tests/wf_api/test_admin_api.py @@ -92,7 +92,7 @@ async def test_admin_api_lists_events() -> None: assert payload["total"] == 1 assert payload["events"][0]["kind"] == "connection_registered" - assert payload["events"][0]["connection_id"] == "alpha.work" + assert payload["events"][0].get("connection_id") == "alpha.work" def test_admin_api_satisfies_surface_protocol() -> None: diff --git a/tests/wf_api/test_capability_api.py b/tests/wf_api/test_capability_api.py index e04638c2..383e30bd 100644 --- a/tests/wf_api/test_capability_api.py +++ b/tests/wf_api/test_capability_api.py @@ -230,7 +230,9 @@ async def test_create_draft_workspace_from_capability(tmp_path: Path) -> None: workspace_id="echo_ws", include_draft=True ) - assert fetched["draft"]["steps"]["call"]["use"] == "demo.personal.echo_tool" + draft = fetched.get("draft") + assert draft is not None + assert draft["steps"]["call"]["use"] == "demo.personal.echo_tool" @pytest.mark.asyncio diff --git a/tests/wf_api/test_composite_input_workflow.py b/tests/wf_api/test_composite_input_workflow.py index 2f00956f..d7583a1f 100644 --- a/tests/wf_api/test_composite_input_workflow.py +++ b/tests/wf_api/test_composite_input_workflow.py @@ -78,7 +78,9 @@ async def test_composite_concat_runs_through_the_platform_registry( compiled = await server.api.compile_draft_workspace( workspace_id="composite_concat", ) - plan = RawWorkflowPlan.model_validate(compiled["compiled_plan"]) + compiled_plan = compiled.get("compiled_plan") + assert compiled_plan is not None + plan = RawWorkflowPlan.model_validate(compiled_plan) run = await server.context.runtime.run_workflow_from_plan(plan, {}) assert run.trace[0].resolved_input == {