@@ -125,7 +125,7 @@ async def test_greeting_exception(self, mock_azure_openai, chat_plugin):
125125 @patch ("helpers.azure_openai_helper.get_bearer_token_provider" )
126126 @patch ("plugins.chat_with_data_plugin.execute_sql_query" )
127127 @patch ("helpers.azure_openai_helper.openai.AzureOpenAI" )
128- async def test_get_SQL_Response (self , mock_azure_openai , mock_execute_sql , mock_token_provider , mock_config , chat_plugin ):
128+ async def test_get_sql_response (self , mock_azure_openai , mock_execute_sql , mock_token_provider , mock_config , chat_plugin ):
129129
130130 # Setup mocks
131131 mock_config_instance = MagicMock ()
@@ -143,7 +143,7 @@ async def test_get_SQL_Response(self, mock_azure_openai, mock_execute_sql, mock_
143143 mock_execute_sql .return_value = "Query results data"
144144
145145 # Call the method
146- result = await chat_plugin .get_SQL_Response ("Show me all call data" )
146+ result = await chat_plugin .get_sql_response ("Show me all call data" )
147147
148148 # Assertions
149149 assert result == "Query results data"
@@ -160,7 +160,7 @@ async def test_get_SQL_Response(self, mock_azure_openai, mock_execute_sql, mock_
160160 @patch ("plugins.chat_with_data_plugin.execute_sql_query" )
161161 @patch ("plugins.chat_with_data_plugin.AIProjectClient" )
162162 @patch ("plugins.chat_with_data_plugin.DefaultAzureCredential" )
163- async def test_get_SQL_Response_with_ai_project_client (self , mock_azure_credential , mock_ai_project_client , mock_execute_sql , mock_config , chat_plugin ):
163+ async def test_get_sql_response_with_ai_project_client (self , mock_azure_credential , mock_ai_project_client , mock_execute_sql , mock_config , chat_plugin ):
164164 # Setup AIProjectClient
165165 chat_plugin .use_ai_project_client = True
166166
@@ -182,7 +182,7 @@ async def test_get_SQL_Response_with_ai_project_client(self, mock_azure_credenti
182182 mock_execute_sql .return_value = "Query results data with AI Project Client"
183183
184184 # Call the method
185- result = await chat_plugin .get_SQL_Response ("Show me call data" )
185+ result = await chat_plugin .get_sql_response ("Show me call data" )
186186
187187 # Assertions
188188 assert result == "Query results data with AI Project Client"
@@ -195,14 +195,14 @@ async def test_get_SQL_Response_with_ai_project_client(self, mock_azure_credenti
195195 @pytest .mark .asyncio
196196 @patch ("plugins.chat_with_data_plugin.execute_sql_query" )
197197 @patch ("helpers.azure_openai_helper.openai.AzureOpenAI" )
198- async def test_get_SQL_Response_exception (self , mock_azure_openai , mock_execute_sql , chat_plugin ):
198+ async def test_get_sql_response_exception (self , mock_azure_openai , mock_execute_sql , chat_plugin ):
199199 # Setup mock to raise exception
200200 mock_client = MagicMock ()
201201 mock_azure_openai .return_value = mock_client
202202 mock_client .chat .completions .create .side_effect = Exception ("Test error" )
203203
204204 # Call the method
205- result = await chat_plugin .get_SQL_Response ("Show me data" )
205+ result = await chat_plugin .get_sql_response ("Show me data" )
206206
207207 # Assertions
208208 assert result == "Details could not be retrieved. Please try again later."
0 commit comments