litellm/tests/test_litellm/proxy/ui_crud_endpoints
devin-ai-integration[bot] 9e92fadacf
test(proxy): give every ui settings endpoint test a fresh settings store (#42430)
* test(proxy): give every ui settings endpoint test a fresh settings store

Under xdist the module-scoped reload in tests/test_litellm/conftest.py is skipped, so a health endpoint test's lifespan startup leaves proxy_server.general_settings bound to the ProxyConfig singleton's SettingsStore for the rest of the worker. Every /get or /update ui_settings call in test_proxy_setting_endpoints.py then writes into that shared store, and since get_ui_settings merges proxy_config.settings over the stored row, a leaked team_admin_editable_team_fields: [] from the PTU round-trip test beat the mocked DB row in test_get_reports_the_stored_list_and_advertises_supported_fields. An autouse fixture now binds both proxy_config.settings and general_settings to a fresh store for each test in the file, and a regression pair checks a runtime-flag write lands in the store the endpoint reads and does not survive into the next test.

* test(proxy): assert ui settings isolation through the endpoints

Replace the fixture-structure assertions with a parametrized GET/PATCH round trip on /get/ui_settings and /update/ui_settings that fails whenever one case's PATCH leaks into the next case's GET.

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-09-22 11:02:42 -07:00
..
test_latest_release_endpoints.py fix(proxy): count unprefixed release bullets and coalesce concurrent latest release fetches 2026-09-19 00:22:15 +00:00
test_proxy_setting_endpoints.py test(proxy): give every ui settings endpoint test a fresh settings store (#42430) 2026-09-22 11:02:42 -07:00
test_user_banner_endpoints.py feat(ui): add admin-configurable user banner (#35729) 2026-08-04 09:24:29 -07:00