mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
test(cli): patch Session.send so the connection-error mock covers models and keys clients
This commit is contained in:
parent
094546387b
commit
ec008793f1
1 changed files with 1 additions and 1 deletions
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue