From e8ea08dd61851e158eb41e3ea5edd262b3d2d61b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Sun, 31 Mar 2019 13:54:50 +0200 Subject: [PATCH] Add testcase for mapped over discovered dataset consumption --- test/api/test_workflows.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/api/test_workflows.py b/test/api/test_workflows.py index dbbbdd7c96f..dd8ee60307b 100644 --- a/test/api/test_workflows.py +++ b/test/api/test_workflows.py @@ -1130,6 +1130,41 @@ steps: assert len(identifiers) == 6 assert "oe1-ie1" in identifiers + @skip_without_tool("collection_paired_test") + def test_workflow_flatten_with_mapped_over_execution(self): + with self.dataset_populator.test_history() as history_id: + self._run_jobs(r""" +class: GalaxyWorkflow +inputs: + input_fastqs: collection +steps: + split_up: + tool_id: collection_split_on_column + in: + input1: input_fastqs + flatten: + tool_id: '__FLATTEN__' + in: + input: split_up/split_output + join_identifier: '-' +test_data: + input_fastqs: + type: list + elements: + - identifier: samp1 + content: "0\n1" +""", history_id=history_id) + history = self._get('histories/%s/contents' % history_id).json() + flattened_collection = history[-1] + assert flattened_collection['history_content_type'] == 'dataset_collection' + assert flattened_collection['collection_type'] == 'list' + assert flattened_collection['element_count'] == 2 + nested_collection = self.dataset_populator.get_history_collection_details(history_id, hid=3) + assert nested_collection['collection_type'] == 'list:list' + assert nested_collection['element_count'] == 1 + assert nested_collection['elements'][0]['object']['populated'] + assert nested_collection['elements'][0]['object']['element_count'] == 2 + @skip_without_tool("__APPLY_RULES__") def test_workflow_run_apply_rules(self): with self.dataset_populator.test_history() as history_id: