Skip to content

Commit bc9e8d2

Browse files
author
Mateusz
committed
test: update gemini health check test to reflect removal of fetchAvailableModels
Modified test_gemini_health_check.py to assert that only loadCodeAssist is called, following the deprecation of the fetchAvailableModels endpoint.
1 parent be56680 commit bc9e8d2

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/unit/connectors/test_gemini_health_check.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ async def test_health_check_uses_load_code_assist_endpoint(
5353
mock_client = _MockAsyncClient()
5454
backend.client = mock_client # type: ignore[assignment]
5555

56-
ok = await backend._perform_health_check()
57-
assert ok is True
58-
assert mock_client.calls, "Health check did not invoke HTTP client"
59-
# The fallback should issue a POST to loadCodeAssist after initial GET fails
60-
methods = [method for method, _ in mock_client.calls]
61-
assert "POST" in methods
62-
post_calls = [url for method, url in mock_client.calls if method == "POST"]
63-
assert post_calls and post_calls[-1].endswith("/v1internal:loadCodeAssist")
56+
ok = await backend._perform_health_check()
57+
assert ok is True
58+
assert mock_client.calls, "Health check did not invoke HTTP client"
59+
# Now only issues a POST to loadCodeAssist (fetchAvailableModels is deprecated)
60+
methods = [method for method, _ in mock_client.calls]
61+
assert "POST" in methods
62+
assert "GET" not in methods
63+
post_calls = [url for method, url in mock_client.calls if method == "POST"]
64+
assert post_calls and post_calls[-1].endswith("/v1internal:loadCodeAssist")
65+

0 commit comments

Comments
 (0)