From 40a0c6ddd94e94df3eae9939703bafd924422d73 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 12 Nov 2021 19:24:24 +0100 Subject: [PATCH] Assert length of input connections, instead of inputs when disconnecting steps Inputs become runtime inputs due to: ``` if "inputs" in step_dict: for input_dict in step_dict["inputs"]: step_input = model.WorkflowStepInput(step) ... ``` in galaxy.managers.workflows.WorkflowContentsManager. I guess it is debatable whether we want to adjust the test or WorkflowContentsManager for disconnected steps. When exported to .ga these are exactly the same (minus uuid differences). --- test/integration/test_workflow_refactoring.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/test_workflow_refactoring.py b/test/integration/test_workflow_refactoring.py index 17ba3819c60a..6bce5f080a6f 100644 --- a/test/integration/test_workflow_refactoring.py +++ b/test/integration/test_workflow_refactoring.py @@ -120,6 +120,7 @@ def test_basic_refactoring_types(self): assert self._latest_workflow.step_by_label("new_param2").position["left"] == 2 assert len(self._latest_workflow.step_by_label("first_cat").inputs) == 1 + assert len(self._latest_workflow.step_by_label("first_cat").inputs[0].connections) == 1 actions = [ { "action_type": "disconnect", @@ -128,7 +129,8 @@ def test_basic_refactoring_types(self): } ] self._refactor(actions) - assert len(self._latest_workflow.step_by_label("first_cat").inputs) == 0 + assert len(self._latest_workflow.step_by_label("first_cat").inputs) == 1 + assert len(self._latest_workflow.step_by_label("first_cat").inputs[0].connections) == 0 actions = [ {