mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
test(proxy): justify module-global patches in startup cleanup regression test
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
b27d92bd62
commit
39a41533dd
1 changed files with 9 additions and 3 deletions
|
|
@ -7631,9 +7631,15 @@ async def test_startup_schedules_first_retention_cleanup_soon_after_boot(monkeyp
|
|||
mock_proxy_logging.db_spend_update_writer = MagicMock()
|
||||
|
||||
with (
|
||||
patch("litellm.proxy.proxy_server.proxy_config", _mock_scheduled_proxy_config()),
|
||||
patch("litellm.proxy.proxy_server.store_model_in_db", False),
|
||||
patch("litellm.proxy.proxy_server.get_secret_bool", return_value=False),
|
||||
patch( # test-quality-ok: initialize_scheduled_background_jobs reads these module globals, there is no seam to inject them
|
||||
"litellm.proxy.proxy_server.proxy_config", _mock_scheduled_proxy_config()
|
||||
),
|
||||
patch( # test-quality-ok: same module global as above
|
||||
"litellm.proxy.proxy_server.store_model_in_db", False
|
||||
),
|
||||
patch( # test-quality-ok: same module global as above
|
||||
"litellm.proxy.proxy_server.get_secret_bool", return_value=False
|
||||
),
|
||||
):
|
||||
before = datetime.now(timezone.utc)
|
||||
await ProxyStartupEvent.initialize_scheduled_background_jobs(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue