test(proxy): expect the unsupported cache type error from _init_cache

The test pinned the old fallthrough, where an unknown type left the cache
without a backend and the proxy hit an AttributeError reading it
This commit is contained in:
Yuneng Jiang 2026-10-23 16:01:22 -07:00
parent c618a0eddb
commit 118081ba66
No known key found for this signature in database

View file

@ -1656,7 +1656,7 @@ def test_ProxyConfig__init_cache_sets_litellm_cache(monkeypatch):
def test_ProxyConfig__init_cache_invalid_params_raises():
pc = ProxyConfig()
with pytest.raises(AttributeError):
with pytest.raises(ValueError, match="Unsupported cache type 'this-cache-type-does-not-exist'"):
pc._init_cache(cache_params={"type": "this-cache-type-does-not-exist"})