@@ -772,12 +772,12 @@ def test_search(self, history_id):
772772 search_payload = self ._search_payload (history_id = history_id , tool_id = "cat1" , inputs = copied_inputs )
773773 self ._search (search_payload , expected_search_count = 1 )
774774 # Now we delete the original input HDA that was used -- we should still be able to find the job
775- delete_respone = self ._delete (f"histories/{ history_id } /contents/{ dataset_id } " )
776- self ._assert_status_code_is_ok (delete_respone )
775+ delete_response = self ._delete (f"histories/{ history_id } /contents/{ dataset_id } " )
776+ self ._assert_status_code_is_ok (delete_response )
777777 self ._search (search_payload , expected_search_count = 1 )
778778 # Now we also delete the copy -- we shouldn't find a job
779- delete_respone = self ._delete (f"histories/{ new_history_id } /contents/{ new_dataset_id } " )
780- self ._assert_status_code_is_ok (delete_respone )
779+ delete_response = self ._delete (f"histories/{ new_history_id } /contents/{ new_dataset_id } " )
780+ self ._assert_status_code_is_ok (delete_response )
781781 self ._search (search_payload , expected_search_count = 0 )
782782
783783 @pytest .mark .require_new_history
@@ -802,8 +802,8 @@ def test_search_delete_outputs(self, history_id):
802802 inputs = json .dumps ({"input1" : {"src" : "hda" , "id" : dataset_id }})
803803 tool_response = self ._job_search (tool_id = "cat1" , history_id = history_id , inputs = inputs )
804804 output_id = tool_response .json ()["outputs" ][0 ]["id" ]
805- delete_respone = self ._delete (f"histories/{ history_id } /contents/{ output_id } " )
806- self ._assert_status_code_is_ok (delete_respone )
805+ delete_response = self ._delete (f"histories/{ history_id } /contents/{ output_id } " )
806+ self ._assert_status_code_is_ok (delete_response )
807807 search_payload = self ._search_payload (history_id = history_id , tool_id = "cat1" , inputs = inputs )
808808 self ._search (search_payload , expected_search_count = 0 )
809809
@@ -846,8 +846,8 @@ def test_search_with_hdca_list_input(self, history_id):
846846 # We delete the ouput (this is a HDA, as multi_data_param reduces collections)
847847 # and use the correct input job definition, the job should not be found
848848 output_id = tool_response .json ()["outputs" ][0 ]["id" ]
849- delete_respone = self ._delete (f"histories/{ history_id } /contents/{ output_id } " )
850- self ._assert_status_code_is_ok (delete_respone )
849+ delete_response = self ._delete (f"histories/{ history_id } /contents/{ output_id } " )
850+ self ._assert_status_code_is_ok (delete_response )
851851 search_payload = self ._search_payload (history_id = history_id , tool_id = "multi_data_param" , inputs = inputs )
852852 self ._search (search_payload , expected_search_count = 0 )
853853
@@ -860,17 +860,22 @@ def test_search_delete_hdca_output(self, history_id):
860860 }
861861 )
862862 tool_response = self ._job_search (tool_id = "collection_creates_list" , history_id = history_id , inputs = inputs )
863- output_id = tool_response .json ()["outputs" ][0 ]["id" ]
863+ output_dict = tool_response .json ()["outputs" ][0 ]
864+ assert output_dict ["history_content_type" ] == "dataset"
865+ output_id = output_dict ["id" ]
866+ # Wait for job search to register the job, make sure initial conditions set.
867+ search_payload = self ._search_payload (history_id = history_id , tool_id = "collection_creates_list" , inputs = inputs )
868+ self ._search (search_payload , expected_search_count = 1 )
864869 # We delete a single tool output, no job should be returned
865- delete_respone = self ._delete (f"histories/{ history_id } /contents/{ output_id } " )
866- self ._assert_status_code_is_ok (delete_respone )
870+ delete_response = self ._delete (f"histories/{ history_id } /contents/datasets /{ output_id } " )
871+ self ._assert_status_code_is_ok (delete_response )
867872 search_payload = self ._search_payload (history_id = history_id , tool_id = "collection_creates_list" , inputs = inputs )
868873 self ._search (search_payload , expected_search_count = 0 )
869874 tool_response = self ._job_search (tool_id = "collection_creates_list" , history_id = history_id , inputs = inputs )
870875 output_collection_id = tool_response .json ()["output_collections" ][0 ]["id" ]
871876 # We delete a collection output, no job should be returned
872- delete_respone = self ._delete (f"histories/{ history_id } /contents/dataset_collections/{ output_collection_id } " )
873- self ._assert_status_code_is_ok (delete_respone )
877+ delete_response = self ._delete (f"histories/{ history_id } /contents/dataset_collections/{ output_collection_id } " )
878+ self ._assert_status_code_is_ok (delete_response )
874879 search_payload = self ._search_payload (history_id = history_id , tool_id = "collection_creates_list" , inputs = inputs )
875880 self ._search (search_payload , expected_search_count = 0 )
876881
@@ -901,12 +906,12 @@ def test_search_with_hdca_pair_input(self, history_id):
901906 )
902907 self ._search (search_payload , expected_search_count = 1 )
903908 # Now we delete the original input HDCA that was used -- we should still be able to find the job
904- delete_respone = self ._delete (f"histories/{ history_id } /contents/dataset_collections/{ list_id_a } " )
905- self ._assert_status_code_is_ok (delete_respone )
909+ delete_response = self ._delete (f"histories/{ history_id } /contents/dataset_collections/{ list_id_a } " )
910+ self ._assert_status_code_is_ok (delete_response )
906911 self ._search (search_payload , expected_search_count = 1 )
907912 # Now we also delete the copy -- we shouldn't find a job
908- delete_respone = self ._delete (f"histories/{ history_id } /contents/dataset_collections/{ new_list_a } " )
909- self ._assert_status_code_is_ok (delete_respone )
913+ delete_response = self ._delete (f"histories/{ history_id } /contents/dataset_collections/{ new_list_a } " )
914+ self ._assert_status_code_is_ok (delete_response )
910915 self ._search (search_payload , expected_search_count = 0 )
911916
912917 @pytest .mark .require_new_history
0 commit comments