mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #5784 from jmchilton/1801_fix_unzip
[18.01] Fix model operation tools that produce standalone datasets.
This commit is contained in:
@@ -69,5 +69,12 @@ class ModelOperationToolAction(DefaultToolAction):
|
||||
|
||||
def _produce_outputs(self, trans, tool, out_data, output_collections, incoming, history, tags):
|
||||
tool.produce_outputs(trans, out_data, output_collections, incoming, history=history, tags=tags)
|
||||
mapped_over_elements = output_collections.dataset_collection_elements
|
||||
if mapped_over_elements:
|
||||
for name, value in out_data.items():
|
||||
if name in mapped_over_elements:
|
||||
value.visible = False
|
||||
mapped_over_elements[name].hda = value
|
||||
|
||||
trans.sa_session.add_all(out_data.values())
|
||||
trans.sa_session.flush()
|
||||
|
||||
@@ -168,7 +168,11 @@ class ToolsTestCase(api.ApiTestCase):
|
||||
}
|
||||
}
|
||||
self.dataset_populator.wait_for_history(history_id, assert_ok=True)
|
||||
self._run("__UNZIP_COLLECTION__", history_id, inputs, assert_ok=True)
|
||||
response = self._run("__UNZIP_COLLECTION__", history_id, inputs, assert_ok=True)
|
||||
implicit_collections = response["implicit_collections"]
|
||||
self.assertEquals(len(implicit_collections), 2)
|
||||
unzipped_hdca = self.dataset_populator.get_history_collection_details(history_id, hid=implicit_collections[0]["hid"])
|
||||
assert unzipped_hdca["elements"][0]["element_type"] == "hda", unzipped_hdca
|
||||
|
||||
def test_zip_inputs(self):
|
||||
with self.dataset_populator.test_history() as history_id:
|
||||
|
||||
Reference in New Issue
Block a user