@@ -45,7 +45,7 @@ class TestAgnoIntegration:
4545
4646 def test_to_agno_without_agno_installed (self , mock_tool : StackOneTool ) -> None :
4747 """Test that proper error is raised when Agno is not installed"""
48- with patch .dict (' sys.modules' , {' agno' : None , ' agno.tools' : None }):
48+ with patch .dict (" sys.modules" , {" agno" : None , " agno.tools" : None }):
4949 with pytest .raises (ImportError ) as exc_info :
5050 mock_tool .to_agno ()
5151
@@ -58,10 +58,10 @@ def test_to_agno_with_mocked_agno(self, mock_tool: StackOneTool) -> None:
5858 mock_agno_base_tool = MagicMock ()
5959 mock_agno_module = MagicMock ()
6060 mock_agno_module .Tool = mock_agno_base_tool
61-
62- with patch .dict (' sys.modules' , {' agno.tools' : mock_agno_module }):
61+
62+ with patch .dict (" sys.modules" , {" agno.tools" : mock_agno_module }):
6363 agno_tool = mock_tool .to_agno ()
64-
64+
6565 # Verify an Agno tool instance was created
6666 assert agno_tool is not None
6767
@@ -70,23 +70,23 @@ def test_to_agno_tool_execution(self, mock_tool: StackOneTool) -> None:
7070 mock_agno_base_tool = MagicMock ()
7171 mock_agno_module = MagicMock ()
7272 mock_agno_module .Tool = mock_agno_base_tool
73-
74- with patch .dict (' sys.modules' , {' agno.tools' : mock_agno_module }):
73+
74+ with patch .dict (" sys.modules" , {" agno.tools" : mock_agno_module }):
7575 agno_tool = mock_tool .to_agno ()
76-
76+
7777 # Verify the tool was created (basic functionality test)
7878 assert agno_tool is not None
79- assert hasattr (agno_tool , ' run' )
79+ assert hasattr (agno_tool , " run" )
8080
8181 def test_tools_to_agno (self , tools_collection : Tools ) -> None :
8282 """Test converting Tools collection to Agno format"""
8383 mock_agno_base_tool = MagicMock ()
8484 mock_agno_module = MagicMock ()
8585 mock_agno_module .Tool = mock_agno_base_tool
86-
87- with patch .dict (' sys.modules' , {' agno.tools' : mock_agno_module }):
86+
87+ with patch .dict (" sys.modules" , {" agno.tools" : mock_agno_module }):
8888 agno_tools = tools_collection .to_agno ()
89-
89+
9090 # Verify we got the expected number of tools
9191 assert len (agno_tools ) == 1
9292 assert agno_tools [0 ] is not None
@@ -112,14 +112,14 @@ def test_tools_to_agno_multiple_tools(self) -> None:
112112 )
113113
114114 tools = Tools ([tool1 , tool2 ])
115-
115+
116116 mock_agno_base_tool = MagicMock ()
117117 mock_agno_module = MagicMock ()
118118 mock_agno_module .Tool = mock_agno_base_tool
119-
120- with patch .dict (' sys.modules' , {' agno.tools' : mock_agno_module }):
119+
120+ with patch .dict (" sys.modules" , {" agno.tools" : mock_agno_module }):
121121 agno_tools = tools .to_agno ()
122-
122+
123123 assert len (agno_tools ) == 2
124124 assert all (tool is not None for tool in agno_tools )
125125
@@ -128,23 +128,23 @@ def test_agno_tool_preserves_metadata(self, mock_tool: StackOneTool) -> None:
128128 mock_agno_base_tool = MagicMock ()
129129 mock_agno_module = MagicMock ()
130130 mock_agno_module .Tool = mock_agno_base_tool
131-
132- with patch .dict (' sys.modules' , {' agno.tools' : mock_agno_module }):
131+
132+ with patch .dict (" sys.modules" , {" agno.tools" : mock_agno_module }):
133133 agno_tool = mock_tool .to_agno ()
134-
134+
135135 # Verify the tool was created with expected attributes
136136 assert agno_tool is not None
137137 # For real integration, name and description would be set by the Agno base class
138- assert hasattr (agno_tool , ' name' )
139- assert hasattr (agno_tool , ' description' )
138+ assert hasattr (agno_tool , " name" )
139+ assert hasattr (agno_tool , " description" )
140140
141141
142142class TestAgnoIntegrationErrors :
143143 """Test error handling in Agno integration"""
144144
145145 def test_agno_import_error_message (self , mock_tool : StackOneTool ) -> None :
146146 """Test that ImportError contains helpful installation instructions"""
147- with patch .dict (' sys.modules' , {' agno' : None , ' agno.tools' : None }):
147+ with patch .dict (" sys.modules" , {" agno" : None , " agno.tools" : None }):
148148 with pytest .raises (ImportError ) as exc_info :
149149 mock_tool .to_agno ()
150150
0 commit comments