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_gemini_get_complete_url

Ishaan Jafferce6045385580
diff --git a/tests/test_litellm/llms/vertex_ai/image_generation/test_vertex_ai_image_generation_transformation.py b/tests/test_litellm/llms/vertex_ai/image_generation/test_vertex_ai_image_generation_transformation.py
index c387c466bc8..7cba03c38c8 100644
--- a/tests/test_litellm/llms/vertex_ai/image_generation/test_vertex_ai_image_generation_transformation.py
+++ b/tests/test_litellm/llms/vertex_ai/image_generation/test_vertex_ai_image_generation_transformation.py
@@ -418,22 +418,20 @@ class TestVertexAIImageGenerationIntegration:
def test_gemini_get_complete_url(self):
"""Test Gemini config URL generation"""
config = VertexAIGeminiImageGenerationConfig()
- with patch.object(
- config, "_resolve_vertex_project", return_value="test-project"
- ), patch.object(
- config, "_resolve_vertex_location", return_value="us-central1"
- ):
- url = config.get_complete_url(
- api_base=None,
- api_key=None,
- model="gemini-2.5-flash-image",
- optional_params={},
- litellm_params={},
- )
- assert "test-project" in url
- assert "us-central1" in url
- assert "gemini-2.5-flash-image" in url
- assert "generateContent" in url
+ url = config.get_complete_url(
+ api_base=None,
+ api_key=None,
+ model="gemini-2.5-flash-image",
+ optional_params={},
+ litellm_params={
+ "vertex_project": "test-project",
+ "vertex_location": "us-central1",
+ },
+ )
+ assert "test-project" in url
+ assert "us-central1" in url
+ assert "gemini-2.5-flash-image" in url
+ assert "generateContent" in url
def test_imagen_get_complete_url(self):
"""Test Imagen config URL generation"""