Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(vertex-ai): drop Lyria auth patches from transform tests

Emerson Gomesc784e604acc7
diff --git a/tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py b/tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py
index 3fc5278d3dd..457c3f76dbb 100644
--- a/tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py
+++ b/tests/test_litellm/llms/vertex_ai/text_to_speech/test_transformation.py
@@ -335,16 +335,17 @@ class TestVertexAILyriaTextToSpeechConfig:
),
],
)
- @patch.object(VertexAILyriaTextToSpeechConfig, "_ensure_access_token")
def test_transform_request(
self,
- mock_ensure_token,
model,
response_format,
expected_body,
):
- mock_ensure_token.return_value = ("mock-token", "music-project")
- config = VertexAILyriaTextToSpeechConfig()
+ class _LyriaConfig(VertexAILyriaTextToSpeechConfig):
+ def _ensure_access_token(self, *args: object, **kwargs: object) -> tuple[str, str]:
+ return "mock-token", "music-project"
+
+ config = _LyriaConfig()
request = config.transform_text_to_speech_request(
model=model,
@@ -514,12 +515,12 @@ class TestVertexAILyriaTextToSpeechConfig:
mock_response.status_code = 200
mock_response.json.return_value = response_json
with (
- patch.object(
+ patch.object( # test-quality-ok: litellm.speech has no seam for Vertex token minting
VertexAILyriaTextToSpeechConfig,
"_ensure_access_token",
return_value=("mock-token", "music-project"),
),
- patch(
+ patch( # test-quality-ok: litellm.speech has no seam for the HTTP handler
"litellm.llms.custom_httpx.llm_http_handler.HTTPHandler.post",
return_value=mock_response,
) as mock_post,