From ec008793f1afc553acfc3118b11675e8ae90f2c1 Mon Sep 17 00:00:00 2001 From: ryan-crabbe-berri Date: Wed, 15 Jul 2026 16:44:24 -0700 Subject: [PATCH] test(cli): patch Session.send so the connection-error mock covers models and keys clients --- tests/test_litellm/proxy/client/cli/test_global_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_litellm/proxy/client/cli/test_global_options.py b/tests/test_litellm/proxy/client/cli/test_global_options.py index ced00f51e36..befe99a2214 100644 --- a/tests/test_litellm/proxy/client/cli/test_global_options.py +++ b/tests/test_litellm/proxy/client/cli/test_global_options.py @@ -78,7 +78,7 @@ def test_connection_error_prints_friendly_message(cli_runner, args): """A dead proxy must yield a friendly 'Error:' line and exit 1, not a raw traceback.""" base_url = "http://127.0.0.1:59999" with patch( - "requests.sessions.Session.request", + "requests.sessions.Session.send", side_effect=requests.exceptions.ConnectionError("connection refused"), ): result = cli_runner.invoke(cli, ["--base-url", base_url, *args])