From d72b5431ad9ddd6816d87c47c1a08ee67ceeb099 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 14 Mar 2024 17:00:15 +0100 Subject: [PATCH] Test subworkflow response at /api/worflows/{workflow_id} --- lib/galaxy_test/api/test_workflows.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index 4f6f9a5cbe05..4919f6ca814e 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -328,6 +328,15 @@ def test_show_valid(self): # workflow was created first in this instance. assert sorted(step["id"] for step in workflow["steps"].values()) != [0, 1, 2] + def test_show_subworkflow(self): + workflow_id = self.workflow_populator.upload_yaml_workflow(WORKFLOW_NESTED_SIMPLE) + workflow = self._get(f"workflows/{workflow_id}", {"style": "instance"}).json() + assert isinstance(workflow["id"], str) + subworkflow_step = workflow["steps"]["2"] + assert subworkflow_step["type"] == "subworkflow" + assert isinstance(subworkflow_step["workflow_id"], str) + self._get(f"workflows/{subworkflow_step['workflow_id']}", {"style": "instance"}).json() + def test_show_invalid_key_is_400(self): show_response = self._get(f"workflows/{self._random_key()}") self._assert_status_code_is(show_response, 400)