Skip to content

Commit

Permalink
Test subworkflow response at /api/worflows/{workflow_id}
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Mar 14, 2024
1 parent 27f3480 commit d72b543
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d72b543

Please sign in to comment.