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

Method test_query_anthropic

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

Source from the content-addressed store, hash-verified

279 @unittest.skipIf(skip_llm_tests, skip_message)
280 @patch('tools.llm_api.create_llm_client')
281 def test_query_anthropic(self, mock_create_client):
282 mock_create_client.return_value = self.mock_anthropic_client
283 response = query_llm("Test prompt", provider="anthropic")
284 self.assertEqual(response, "Test Anthropic response")
285 self.mock_anthropic_client.messages.create.assert_called_once_with(
286 # Update model name to the current default
287 model="claude-3-7-sonnet-20250219",
288 max_tokens=1000,
289 messages=[{"role": "user", "content": [{"type": "text", "text": "Test prompt"}]}]
290 )
291
292 @unittest.skipIf(skip_llm_tests, skip_message)
293 @patch('tools.llm_api.create_llm_client')

Callers

nothing calls this directly

Calls 1

query_llmFunction · 0.90

Tested by

no test coverage detected