MCPcopy Create free account
hub / github.com/grapeot/devin.cursorrules / test_query_azure

Method test_query_azure

tests/test_llm_api.py:244–252  ·  view source on GitHub ↗
(self, mock_create_client)

Source from the content-addressed store, hash-verified

242 @unittest.skipIf(skip_llm_tests, skip_message)
243 @patch('tools.llm_api.create_llm_client')
244 def test_query_azure(self, mock_create_client):
245 mock_create_client.return_value = self.mock_azure_client
246 response = query_llm("Test prompt", provider="azure")
247 self.assertEqual(response, "Test Azure OpenAI response")
248 self.mock_azure_client.chat.completions.create.assert_called_once_with(
249 model=os.getenv('AZURE_OPENAI_MODEL_DEPLOYMENT', 'gpt-4o-ms'),
250 messages=[{"role": "user", "content": [{"type": "text", "text": "Test prompt"}]}],
251 temperature=0.7
252 )
253
254 @unittest.skipIf(skip_llm_tests, skip_message)
255 @patch('tools.llm_api.create_llm_client')

Callers

nothing calls this directly

Calls 1

query_llmFunction · 0.90

Tested by

no test coverage detected