MCPcopy Create free account
hub / github.com/BerriAI/litellm / _shell

Function _shell

tests/unit/proxy/client/cli/test_interface.py:14–19  ·  view source on GitHub ↗

Type each line into a bare `lite` shell against the gateway, then quit

(*lines: str, env: Mapping[str, str] | None = None)

Source from the content-addressed store, hash-verified

12
13
14def _shell(*lines: str, env: Mapping[str, str] | None = None) -> Result:
15 """Type each line into a bare `lite` shell against the gateway, then quit"""
16 typed: Final = "".join(f"{line}\n" for line in (*lines, "quit"))
17 return CliRunner(env=env).invoke(
18 cli, ["--base-url", GATEWAY, "--api-key", "sk-shell"], input=typed, prog_name="lite"
19 )
20
21
22@pytest.fixture

Calls 2

joinMethod · 0.80
invokeMethod · 0.45

Tested by

no test coverage detected