mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix: handle proxy internal callbacks in callback management test (#12294)
The test_list_callbacks_mixed_callback_types test was failing when run in parallel with other tests due to the proxy server's internal _PROXY_VirtualKeyModelMaxBudgetLimiter callback persisting across test runs. This fix filters out proxy internal callbacks from the test assertions to ensure consistent test behavior regardless of test execution order or parallelization.
This commit is contained in:
parent
03a589d323
commit
adfe63cf3a
1 changed files with 9 additions and 0 deletions
|
|
@ -169,6 +169,15 @@ class TestCallbackManagementEndpoints:
|
|||
|
||||
response_data = response.json()
|
||||
|
||||
# Filter out any proxy-specific callbacks that might be present from parallel test runs
|
||||
# These are internal callbacks that can persist when tests run in parallel
|
||||
proxy_internal_callbacks = ["_PROXY_VirtualKeyModelMaxBudgetLimiter"]
|
||||
|
||||
response_data["success_and_failure"] = [
|
||||
cb for cb in response_data["success_and_failure"]
|
||||
if cb not in proxy_internal_callbacks
|
||||
]
|
||||
|
||||
# Verify callbacks are properly categorized
|
||||
assert "prometheus" in response_data["success_and_failure"] # callbacks list items go to success_and_failure
|
||||
assert "langfuse" in response_data["success"]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue