mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
fix: Correct test assertion bug and inaccurate docstring
Fix test_utorid_masked checking `result` (dict) instead of `output` (string). Update test_ca_policy_e2e.py docstring to clarify scope vs UofT tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d35a95fc5d
commit
74ed48d5d7
2 changed files with 5 additions and 4 deletions
|
|
@ -1,9 +1,10 @@
|
|||
"""
|
||||
End-to-end tests for Canadian PII Protection (PIPEDA) policy template.
|
||||
|
||||
Tests the complete policy with all Canadian PII patterns — validates that
|
||||
PII-containing prompts are detected/masked and that clean prompts pass through.
|
||||
These tests mirror the canadianPiiCompliancePrompts.ts dataset.
|
||||
Tests the federal/provincial PII patterns (SIN, OHIP, driver's licence, passport,
|
||||
immigration docs, bank account, postal code) — validates that PII-containing prompts
|
||||
are detected/masked and that clean prompts pass through.
|
||||
University of Toronto institutional identifiers are tested separately in test_uoft_policy_e2e.py.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class TestUofTPolicyE2E:
|
|||
)
|
||||
output = result.get("texts", [])[0]
|
||||
assert "[UOFT_UTORID_REDACTED]" in output
|
||||
assert "smithj12" not in result
|
||||
assert "smithj12" not in output
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_utorid_quercus_context_masked(self):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue