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

Method test_query_with_custom_model

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

Source from the content-addressed store, hash-verified

317 @unittest.skipIf(skip_llm_tests, skip_message)
318 @patch('tools.llm_api.create_llm_client')
319 def test_query_with_custom_model(self, mock_create_client):
320 mock_create_client.return_value = self.mock_openai_client
321 response = query_llm("Test prompt", model="custom-model")
322 self.assertEqual(response, "Test OpenAI response")
323 self.mock_openai_client.chat.completions.create.assert_called_once_with(
324 model="custom-model",
325 messages=[{"role": "user", "content": [{"type": "text", "text": "Test prompt"}]}],
326 temperature=0.7
327 )
328
329 @unittest.skipIf(skip_llm_tests, skip_message)
330 @patch('tools.llm_api.create_llm_client')

Callers

nothing calls this directly

Calls 1

query_llmFunction · 0.90

Tested by

no test coverage detected