File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,20 @@ def test_show_output_collection(self):
257257 assert output ["label" ] == "Duplicate List"
258258 assert output ["inherit_format" ] is True
259259
260+ def test_tool_icon_endpoint_with_simple_id (self ):
261+ response = self ._get ("tools/simple_tool_id/icon" )
262+ self ._assert_status_code_is (response , 404 )
263+
264+ def test_tool_icon_endpoint_with_toolshed_id (self ):
265+ # Test complex toolshed tool ID with slashes
266+ toolshed_tool_id = "toolshed.g2.bx.psu.edu/repos/devteam/fastqc/fastqc/0.74+galaxy0"
267+ response = self ._get (f"tools/{ toolshed_tool_id } /icon" )
268+ # We expect either 200 (if tool is installed and has icon) or 404 (if
269+ # not found), but this tests the routing either way.
270+ assert response .status_code in [200 , 404 ]
271+ if response .status_code == 200 :
272+ assert response .headers ["Content-Type" ] == "image/png"
273+
260274 @skip_without_tool ("test_data_source" )
261275 def test_data_source_build_request (self ):
262276 with self .dataset_populator .test_history () as history_id :
You can’t perform that action at this time.
0 commit comments