test_redact_multiple_pii() — langchain Function Reference
Architecture documentation for the test_redact_multiple_pii() function in test_pii.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ba145a13_365b_f950_d747_2937e78c7fe2["test_redact_multiple_pii()"] f0334f9f_5b74_843e_1a42_a995ed9c8b18["TestRedactStrategy"] ba145a13_365b_f950_d747_2937e78c7fe2 -->|defined in| f0334f9f_5b74_843e_1a42_a995ed9c8b18 style ba145a13_365b_f950_d747_2937e78c7fe2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py lines 244–254
def test_redact_multiple_pii(self) -> None:
middleware = PIIMiddleware("email", strategy="redact")
state = AgentState[Any](messages=[HumanMessage("Contact alice@test.com or bob@test.com")])
result = middleware.before_model(state, Runtime())
assert result is not None
content = result["messages"][0].content
assert content.count("[REDACTED_EMAIL]") == 2
assert "alice@test.com" not in content
assert "bob@test.com" not in content
Domain
Subdomains
Source
Frequently Asked Questions
What does test_redact_multiple_pii() do?
test_redact_multiple_pii() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py.
Where is test_redact_multiple_pii() defined?
test_redact_multiple_pii() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py at line 244.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free