Files
python-sdk/pkg/hanzo-mcp/tests/test_memory_simple.py
T
zeekay 7ff34ba5bf feat(hanzo-tools): v0.10.17 - modular tool packages + computer control
- Add hanzo-tools-computer package for pyautogui Mac automation
- Fix hanzo-tools-agent imports to use new package structure
- Add get_read_only_*_tools() helpers to filesystem/jupyter
- Remove BatchTool (replaced by dag - one tool per capability)
- Remove hanzo-persona dependency (not published yet)
- Simplify pyproject.toml for local development

Packages ready for PyPI:
- hanzo-tools-core
- hanzo-tools-filesystem
- hanzo-tools-shell
- hanzo-tools-browser
- hanzo-tools-memory
- hanzo-tools-todo
- hanzo-tools-reasoning
- hanzo-tools-lsp
- hanzo-tools-refactor
- hanzo-tools-database
- hanzo-tools-agent
- hanzo-tools-jupyter
- hanzo-tools-editor
- hanzo-tools-computer (NEW)
2025-12-26 06:37:28 -08:00

44 lines
1.3 KiB
Python

"""Simple memory test to verify functionality."""
import pytest
def test_memory_registration():
"""Test that memory tools can be registered."""
from mcp.server.fastmcp import FastMCP
from hanzo_mcp.tools.common.permissions import PermissionManager
# Skip if memory not available
try:
from hanzo_tools.memory import register_memory_tools
except ImportError:
pytest.skip("hanzo-memory not available")
mcp_server = FastMCP("test-server")
permission_manager = PermissionManager()
permission_manager.add_allowed_path("/tmp")
tools = register_memory_tools(mcp_server, permission_manager, user_id="test_user", project_id="test_project")
assert len(tools) == 9
print(f"Successfully registered {len(tools)} memory tools")
def test_memory_descriptions():
"""Test memory tool descriptions."""
try:
from hanzo_tools.memory.memory_tools import CreateMemoriesTool
except ImportError:
pytest.skip("hanzo-memory not available")
tool = CreateMemoriesTool()
assert "save" in tool.description.lower()
assert "memory" in tool.description.lower()
print(f"CreateMemoriesTool description OK: {tool.description[:50]}...")
if __name__ == "__main__":
test_memory_registration()
test_memory_descriptions()
print("\nAll simple tests passed!")