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: assert endpoint config freshness by identity instead of mutating it

Yuneng Jiang5928556c1663
diff --git a/tests/test_litellm/containers/test_endpoint_factory.py b/tests/test_litellm/containers/test_endpoint_factory.py
index 46564bb1810..8de0d039afc 100644
--- a/tests/test_litellm/containers/test_endpoint_factory.py
+++ b/tests/test_litellm/containers/test_endpoint_factory.py
@@ -47,8 +47,10 @@ class TestEndpointsConfig:
def test_config_is_reread_rather_than_shared_between_callers(self):
first = _load_endpoints_config()
- first["endpoints"].clear()
- assert len(_load_endpoints_config()["endpoints"]) == len(_SYNC_NAMES)
+ second = _load_endpoints_config()
+ assert first is not second
+ assert first["endpoints"] is not second["endpoints"]
+ assert first == second
class TestResponseTypeMapping: