test_memories_prefix() — langchain Function Reference
Architecture documentation for the test_memories_prefix() function in test_anthropic_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD be7d0b10_b401_d01d_8733_10f5174645c8["test_memories_prefix()"] 9599afe1_8f2e_3733_d25a_c88263c5beba["TestPathValidation"] be7d0b10_b401_d01d_8733_10f5174645c8 -->|defined in| 9599afe1_8f2e_3733_d25a_c88263c5beba style be7d0b10_b401_d01d_8733_10f5174645c8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/middleware/test_anthropic_tools.py lines 55–63
def test_memories_prefix(self) -> None:
"""Test /memories prefix validation for memory tools."""
assert (
_validate_path("/memories/notes.txt", allowed_prefixes=["/memories"])
== "/memories/notes.txt"
)
with pytest.raises(ValueError, match="Path must start with"):
_validate_path("/other/notes.txt", allowed_prefixes=["/memories"])
Domain
Subdomains
Source
Frequently Asked Questions
What does test_memories_prefix() do?
test_memories_prefix() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_anthropic_tools.py.
Where is test_memories_prefix() defined?
test_memories_prefix() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_anthropic_tools.py at line 55.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free