mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
test(vertex-ai): drop Lyria auth patches from transform tests
Subclass the Lyria transformer to stub token minting, and mark the remaining litellm.speech patches so TQ008 stays within budget.
This commit is contained in:
parent
e18df8f09e
commit
c784e604ac
1 changed files with 7 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue