@@ -286,6 +286,26 @@ def test_build_request_dbkey_filter_unset(self):
286286 assert "hg18_value" in option_values
287287 assert "mm10_value" in option_values
288288
289+ @skip_without_tool ("dbkey_filter_collection_input" )
290+ def test_run_dbkey_filter_nested_collection_dce (self ):
291+ with self .dataset_populator .test_history () as history_id :
292+ list_list = self .dataset_collection_populator .create_list_of_list_in_history (history_id , wait = True ).json ()
293+ # Set dbkey on the datasets in the inner list
294+ for outer_element in list_list ["elements" ]:
295+ for inner_element in outer_element ["object" ]["elements" ]:
296+ hda_id = inner_element ["object" ]["id" ]
297+ self .dataset_populator ._put (
298+ f"histories/{ history_id } /contents/{ hda_id } " , {"genome_build" : "hg19" }, json = True
299+ )
300+ # Get DCE ID of the inner list element - this is a DatasetCollectionElement
301+ # wrapping a child collection (not an HDA)
302+ dce_id = list_list ["elements" ][0 ]["id" ]
303+ inputs = {
304+ "inputs" : {"src" : "dce" , "id" : dce_id },
305+ "index" : "hg19_value" ,
306+ }
307+ self ._run ("dbkey_filter_collection_input" , history_id , inputs , assert_ok = True )
308+
289309 @skip_without_tool ("cheetah_problem_unbound_var_input" )
290310 def test_legacy_biotools_xref_injection (self ):
291311 url = self ._api_url ("tools/cheetah_problem_unbound_var_input" )
0 commit comments