fix: add monkeypatch isolation to wildcard test

This commit is contained in:
Hannah Smith 2026-04-21 23:24:13 -04:00
parent c62a1e28de
commit a93cedb03a

View file

@ -39,10 +39,12 @@ async def test_update_litellm_params_max_tokens_custom():
@pytest.mark.asyncio
async def test_update_litellm_params_max_tokens_wildcard():
async def test_update_litellm_params_max_tokens_wildcard(monkeypatch):
"""
Test that max_tokens is not set for wildcard models.
"""
monkeypatch.setattr(hc_module, "BACKGROUND_HEALTH_CHECK_MAX_TOKENS", None)
monkeypatch.setattr(hc_module, "BACKGROUND_HEALTH_CHECK_MAX_TOKENS_REASONING", None)
model_info = {}
litellm_params = {"model": "openai/*"}