litellm/tests/proxy_cli_integration_tests
Stephen Chin 00e35d3019 style: black-format db generate test files
Apply black (26.3.1, repo-pinned) to the new db generate test files so they
pass the lint job's `black --check .` after the rebase onto
litellm_internal_staging. Formatting only, no behavior change.
2026-06-17 08:37:40 -07:00
..
README.md fix(proxy): make prisma generate and db push work out-of-the-box after pip install 2026-06-17 07:19:08 -07:00
test_db_generate_integration.py style: black-format db generate test files 2026-06-17 08:37:40 -07:00

Proxy CLI integration tests

These tests invoke real binaries and subprocesses (for example the installed litellm-proxy console script) rather than mocks. They live here, outside tests/test_litellm/, because that tree is reserved for mock-only unit tests that must run deterministically in CI without external binaries.

Running

They are skipped by default. Opt in with an environment variable:

LITELLM_RUN_INTEGRATION_TESTS=1 pytest tests/proxy_cli_integration_tests/

You also need the package installed so the console scripts exist on PATH:

pip install -e '.[proxy]'

Individual tests additionally pytest.skip themselves when a required binary (such as litellm-proxy) is not present in the active environment, so a partial install degrades to a skip rather than a failure.

Markers

Tests here are tagged with the integration marker (registered in pyproject.toml). To run only integration-marked tests:

LITELLM_RUN_INTEGRATION_TESTS=1 pytest -m integration