litellm/tests/test_litellm/proxy/guardrails
ryan-crabbe-berri 63a2d1ddc9
fix(tests): use canonical litellm_enterprise import path (#27699)
The enterprise package is installed as `litellm_enterprise` (per
enterprise/pyproject.toml), but several tests imported it as
`enterprise.litellm_enterprise.*` — a path that only resolves
because the repo root happens to sit on sys.path, letting Python's
implicit namespace package machinery discover `enterprise/` as a
directory.

This breaks any test runner that relocates source (e.g. the
mutation-testing workflow, which copies tests under `mutants/`) and
also caused two `patch()` strings to target a module path that does
not match what production code imports — meaning those mocks were
never actually patching the production module's attribute.

Replace `from enterprise.litellm_enterprise.` with the canonical
`from litellm_enterprise.` across 6 test files, and fix two
`patch()` target strings (and one `sys.modules` patch key in the
SSO test) to match.
2026-05-12 12:32:57 -07:00
..
guardrail_hooks feat(guardrails): optional skip tool message in unified guardrail inputs 2026-05-07 18:39:26 -07:00
test_content_utils.py fix(guardrails): redact `data["input"]` for Responses-API mask paths 2026-05-01 04:41:57 +00:00
test_custom_code_security.py fix(guardrails): provide _inplacevar_ to sandbox 2026-04-15 15:45:25 -07:00
test_deferred_guardrail_logging.py style: black format test_deferred_guardrail_logging.py 2026-05-01 14:28:20 -07:00
test_guardrail_coverage.py fix(tests): use canonical litellm_enterprise import path (#27699) 2026-05-12 12:32:57 -07:00
test_guardrail_endpoints.py [litellm-agent] Staging → litellm_internal_staging (5/7/2026) (#27375) 2026-05-07 21:29:47 +00:00
test_guardrail_registry.py [litellm-agent] Staging → litellm_internal_staging (5/7/2026) (#27375) 2026-05-07 21:29:47 +00:00
test_init_guardrails.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_llm_as_a_judge.py feat(guardrails): LLM-as-a-Judge guardrail (#26360) 2026-04-24 17:15:32 -07:00
test_mcp_jwt_signer.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_pillar_guardrails.py chore(proxy): harden request control fields 2026-04-29 22:35:17 -07:00
test_prompt_security_guardrails.py fixing prompt-security's guardrail implementation (#19374) 2026-01-21 20:09:40 -08:00
test_qostodian_nexus_guardrail.py feat: add Qohash Nexus guardrail hook (#24927) 2026-05-01 17:26:32 +05:30