From 54c930d2cab32928df628b4ac1bef1081ba35cc3 Mon Sep 17 00:00:00 2001 From: Shreehitha Arushan <130902361+csarushan1729@users.noreply.github.com> Date: Tue, 25 Aug 2026 16:28:01 +0530 Subject: [PATCH] Update tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py b/tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py index df4dac7c201..4753b5fdb9b 100644 --- a/tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py +++ b/tests/test_litellm/proxy/hooks/test_proxy_hooks_init.py @@ -81,6 +81,6 @@ def test_enterprise_hooks_import_failure_logs_warning(monkeypatch, caplog): for record in caplog.records ), "Expected a warning to be logged when enterprise hooks import fails" - monkeypatch.undo() + monkeypatch.setattr(builtins, "__import__", real_import) sys.modules.pop("litellm.proxy.hooks", None) importlib.import_module("litellm.proxy.hooks")