|
23 | 23 | from galaxy_test.base import rules_test_data |
24 | 24 | from galaxy_test.base.api_asserts import ( |
25 | 25 | assert_error_code_is, |
| 26 | + assert_error_message_contains, |
26 | 27 | assert_file_looks_like_xlsx, |
27 | 28 | assert_has_keys, |
28 | 29 | assert_status_code_is, |
@@ -810,6 +811,24 @@ def test_zip_list_inputs(self): |
810 | 811 | ) |
811 | 812 | assert zipped_hdca["collection_type"] == "list:paired" |
812 | 813 |
|
| 814 | + @skip_without_tool("__MERGE_COLLECTION__") |
| 815 | + def test_merge_collection_rejects_structurally_invalid_inputs(self): |
| 816 | + with self.dataset_populator.test_history(require_new=False) as history_id: |
| 817 | + list_paired_id = self.dataset_collection_populator.create_list_of_pairs_in_history( |
| 818 | + history_id, wait=True |
| 819 | + ).json()["outputs"][0]["id"] |
| 820 | + plain_list_id = self.dataset_collection_populator.create_list_in_history( |
| 821 | + history_id, contents=["a", "b"], wait=True |
| 822 | + ).json()["outputs"][0]["id"] |
| 823 | + self.dataset_populator.wait_for_history(history_id, assert_ok=True) |
| 824 | + inputs = { |
| 825 | + "inputs_0|input": {"src": "hdca", "id": list_paired_id}, |
| 826 | + "inputs_1|input": {"src": "hdca", "id": plain_list_id}, |
| 827 | + } |
| 828 | + response = self._run("__MERGE_COLLECTION__", history_id, inputs, assert_ok=False) |
| 829 | + assert_status_code_is(response, 400) |
| 830 | + assert_error_message_contains(response, "must be a sub-collection") |
| 831 | + |
813 | 832 | @skip_without_tool("__EXTRACT_DATASET__") |
814 | 833 | @skip_without_tool("cat_data_and_sleep") |
815 | 834 | def test_database_operation_tool_with_pending_inputs(self): |
|
0 commit comments