From 614d032f1254b5bf5032c4c3ddcecfeba6d1eea7 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 27 Apr 2017 09:17:23 -0400 Subject: [PATCH] Add test case clarifying datasets do get "renamed" by rename PJA in collections. xref #1675 This is of limited utility since we don't really expose the name - and intentionally so. Related open bugs/enhancements that still need to be addressed are: - Applying rename to the collection (in addition to the elements) - #1680. - Download of collection elements with element identifier instead of the name: #2023 / #2140. --- test/api/test_workflows.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/test/api/test_workflows.py b/test/api/test_workflows.py index 00aec22c7682..2c16ac922cb0 100644 --- a/test/api/test_workflows.py +++ b/test/api/test_workflows.py @@ -1289,6 +1289,37 @@ def test_run_with_pja( self ): content = self.dataset_populator.get_history_dataset_details( history_id, wait=True, assert_ok=True ) assert content[ "name" ] == "foo was replaced" + @skip_without_tool( "cat" ) + def test_run_rename_collection_element( self ): + history_id = self.dataset_populator.new_history() + self._run_jobs(""" +class: GalaxyWorkflow +inputs: + - id: input1 + type: data_collection_input + collection_type: list +steps: + - tool_id: cat + label: first_cat + state: + input1: + $link: input1 + outputs: + out_file1: + rename: "my new name" +test_data: + input1: + type: list + name: the_dataset_list + elements: + - identifier: el1 + value: 1.fastq + type: File +""", history_id=history_id) + content = self.dataset_populator.get_history_dataset_details( history_id, hid=3, wait=True, assert_ok=True ) + name = content[ "name" ] + assert name == "my new name", name + @skip_without_tool( "cat" ) def test_run_rename_based_on_input( self ): history_id = self.dataset_populator.new_history()