From af47571ea8a23af1c8704f1da40e7ba562e18e13 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 11 Oct 2024 09:56:51 -0400 Subject: [PATCH] Rebase into test migration. --- lib/galaxy_test/api/test_tools.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/galaxy_test/api/test_tools.py b/lib/galaxy_test/api/test_tools.py index 2b14cfc047b3..79148b2972f0 100644 --- a/lib/galaxy_test/api/test_tools.py +++ b/lib/galaxy_test/api/test_tools.py @@ -2095,20 +2095,13 @@ def test_identifier_with_multiple_normal_datasets(self, history_id): @skip_without_tool("identifier_collection") def test_identifier_with_data_collection(self, history_id): - element_identifiers = self.dataset_collection_populator.list_identifiers(history_id) - - payload = dict( - instance_type="history", - history_id=history_id, - element_identifiers=element_identifiers, - collection_type="list", - ) - - create_response = self._post("dataset_collections", payload, json=True) - dataset_collection = create_response.json() - + contents = [("foo", "text for foo element"), ("bar", "more text for bar element")] + element_identifiers = ["foo", "bar"] + response = self.dataset_collection_populator.create_list_in_history(history_id, contents=contents, wait=True, direct_upload=True) + self._assert_status_code_is(response, 200) + hdca = response.json()["output_collections"][0] inputs = { - "input1": {"src": "hdca", "id": dataset_collection["id"]}, + "input1": {"src": "hdca", "id": hdca["id"]}, } self.dataset_populator.wait_for_history(history_id, assert_ok=True) @@ -2121,7 +2114,7 @@ def test_identifier_with_data_collection(self, history_id): assert len(outputs) == 1 output1 = outputs[0] output1_content = self.dataset_populator.get_history_dataset_content(history_id, dataset=output1) - assert output1_content.strip() == "\n".join(d["name"] for d in element_identifiers) + assert output1_content.strip() == "foo\nbar" @skip_without_tool("identifier_in_actions") def test_identifier_in_actions(self, history_id):