Files
litellm/tests/proxy_unit_tests
Julio Quinteros Pro 2d41b03f8b fix(test): mock environment variables for callback validation test
The test test_proxy_config_state_post_init_callback_call was failing with:
```
ValidationError: 2 validation errors for TeamCallbackMetadata
callback_vars.langfuse_public_key
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
```

Root cause: The test uses environment variable references like
"os.environ/LANGFUSE_PUBLIC_KEY" which get resolved at runtime. In
parallel execution with --dist=loadscope, these environment variables
may not be set in all worker processes, causing the resolution to
return None, which fails Pydantic validation expecting strings.

Solution: Use monkeypatch to set the required environment variables
before the test runs. This ensures consistent behavior across all
test execution environments (local, CI, parallel workers).

Fixes test failure exposed by PR #21277.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-15 20:44:17 -03:00
..
2025-10-25 10:19:24 -07:00
2025-10-25 10:19:24 -07:00
2026-02-13 22:01:28 -08:00
2026-01-16 19:06:23 -08:00
2026-01-31 13:43:53 -08:00
2025-10-25 10:19:24 -07:00
2025-10-25 10:19:24 -07:00
2026-01-26 20:07:30 -08:00
2026-01-20 18:01:22 -08:00
2025-12-20 15:08:31 +05:30