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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix test test_is_assemblyai_route
Ishaan Jaff915cc064c535
diff --git a/tests/pass_through_unit_tests/test_assemblyai_unit_tests_passthrough.py b/tests/pass_through_unit_tests/test_assemblyai_unit_tests_passthrough.pyindex 71bae496714..8279d4c9884 100644--- a/tests/pass_through_unit_tests/test_assemblyai_unit_tests_passthrough.py+++ b/tests/pass_through_unit_tests/test_assemblyai_unit_tests_passthrough.py@@ -103,103 +103,6 @@ def test_poll_assembly_for_transcript_response(assert transcript == AssemblyAITranscriptResponse(**mock_transcript_response)-def mock_request():- request = Mock()- request.method = "POST"- request.headers = {}- request.url = httpx.URL("http://test.com/test")- return request---def mock_response():- return Mock()---def mock_user_api_key_dict():- return {"api_key": "test-key"}---@patch("litellm.utils.get_secret")-@patch(- "litellm.proxy.pass_through_endpoints.pass_through_endpoints.create_pass_through_route"-)-async def test_assemblyai_proxy_route_basic_post(- mock_create_route,- mock_get_secret,- mock_request,- mock_response,- mock_user_api_key_dict,-):- """Test basic POST request handling for AssemblyAI proxy route"""- from litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints import (- assemblyai_proxy_route,- )-- # Setup mocks- mock_get_secret.return_value = "test-assemblyai-key"- mock_request.json = AsyncMock(return_value={"text": "test"})- mock_endpoint_func = AsyncMock(return_value={"result": "success"})- mock_create_route.return_value = mock_endpoint_func-- result = await assemblyai_proxy_route(- endpoint="v2/transcript",- request=mock_request,- fastapi_response=mock_response,- user_api_key_dict=mock_user_api_key_dict,- )-- assert result == {"result": "success"}- mock_create_route.assert_called_once_with(- endpoint="v2/transcript",- target="https://api.assemblyai.com/v2/transcript",- custom_headers={"Authorization": "test-assemblyai-key"},- )---@patch("litellm.utils.get_secret")-@patch(- "litellm.proxy.pass_through_endpoints.pass_through_endpoints.create_pass_through_route"-)-async def test_assemblyai_proxy_route_get_transcript(- mock_create_route,- mock_get_secret,- mock_request,- mock_response,- mock_user_api_key_dict,-):- """Test GET request handling for retrieving a specific transcript from AssemblyAI"""- from litellm.proxy.pass_through_endpoints.llm_passthrough_endpoints import (- assemblyai_proxy_route,- )-- # Setup mocks- mock_get_secret.return_value = "test-assemblyai-key"- mock_request.method = "GET"- mock_endpoint_func = AsyncMock(- return_value={"id": "test-transcript-id", "status": "completed"}- )- mock_create_route.return_value = mock_endpoint_func-- result = await assemblyai_proxy_route(- endpoint="v2/transcript/test-transcript-id",- request=mock_request,- fastapi_response=mock_response,- user_api_key_dict=mock_user_api_key_dict,- )-- assert result == {"id": "test-transcript-id", "status": "completed"}- mock_create_route.assert_called_once_with(- endpoint="v2/transcript/test-transcript-id",- target="https://api.assemblyai.com/v2/transcript/test-transcript-id",- custom_headers={"Authorization": "test-assemblyai-key"},- )--def test_is_assemblyai_route():"""Test that the is_assemblyai_route method correctly identifies AssemblyAI routes