fix(tests): fix 2-value unpackings of _perform_health_check in test_health_check.py

This commit is contained in:
Sameer Kankute 2026-04-02 21:23:12 +05:30
parent 4e60bd5816
commit f3420c9ef0
No known key found for this signature in database

View file

@ -506,7 +506,7 @@ async def test_perform_health_check_filters_by_model_id():
"litellm.proxy.health_check._perform_health_check",
side_effect=mock_perform_health_check,
):
healthy_endpoints, unhealthy_endpoints = await perform_health_check(
healthy_endpoints, unhealthy_endpoints, _ = await perform_health_check(
model_list=model_list, model_id="deployment-id-2", details=True
)
@ -546,7 +546,7 @@ async def test_perform_health_check_with_health_check_model():
return {"status": "healthy"}
with patch("litellm.ahealth_check", side_effect=mock_health_check):
healthy_endpoints, unhealthy_endpoints = await _perform_health_check(model_list)
healthy_endpoints, unhealthy_endpoints, _ = await _perform_health_check(model_list)
print("health check calls: ", health_check_calls)
# Verify the health check used the override model
@ -581,7 +581,7 @@ async def test_health_check_bad_model():
},
]
details = None
healthy_endpoints, unhealthy_endpoints = await _perform_health_check(
healthy_endpoints, unhealthy_endpoints, _ = await _perform_health_check(
model_list, details
)
print(f"healthy_endpoints: {healthy_endpoints}")
@ -599,7 +599,7 @@ async def test_health_check_bad_model():
"litellm.ahealth_check", side_effect=mock_health_check
) as mock_health_check:
start_time = time.time()
healthy_endpoints, unhealthy_endpoints = await _perform_health_check(model_list)
healthy_endpoints, unhealthy_endpoints, _ = await _perform_health_check(model_list)
end_time = time.time()
print("health check calls: ", health_check_calls)
assert len(healthy_endpoints) == 0
@ -691,7 +691,7 @@ async def test_timeout_does_not_cancel_other_health_checks():
return {"status": "healthy"}
with patch("litellm.ahealth_check", side_effect=mock_health_check):
healthy_endpoints, unhealthy_endpoints = await _perform_health_check(
healthy_endpoints, unhealthy_endpoints, _ = await _perform_health_check(
model_list, max_concurrency=1
)