test_mask_ip() — langchain Function Reference
Architecture documentation for the test_mask_ip() function in test_pii.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c7c241e4_441b_6349_6ef5_b6afc8e88599["test_mask_ip()"] 6da4bcad_d3fd_cbf4_a386_d46859fa4911["TestMaskStrategy"] c7c241e4_441b_6349_6ef5_b6afc8e88599 -->|defined in| 6da4bcad_d3fd_cbf4_a386_d46859fa4911 style c7c241e4_441b_6349_6ef5_b6afc8e88599 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py lines 283–292
def test_mask_ip(self) -> None:
middleware = PIIMiddleware("ip", strategy="mask")
state = AgentState[Any](messages=[HumanMessage("IP: 192.168.1.100")])
result = middleware.before_model(state, Runtime())
assert result is not None
content = result["messages"][0].content
assert "*.*.*.100" in content
assert "192.168.1.100" not in content
Domain
Subdomains
Source
Frequently Asked Questions
What does test_mask_ip() do?
test_mask_ip() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py.
Where is test_mask_ip() defined?
test_mask_ip() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_pii.py at line 283.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free