Initial CivilPlan MCP implementation
This commit is contained in:
29
tests/test_server_registration.py
Normal file
29
tests/test_server_registration.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import asyncio
|
||||
|
||||
from civilplan_mcp.server import build_mcp, build_server_config
|
||||
|
||||
|
||||
def test_build_server_config_defaults() -> None:
|
||||
config = build_server_config()
|
||||
|
||||
assert config["host"] == "127.0.0.1"
|
||||
assert config["port"] == 8765
|
||||
assert config["path"] == "/mcp"
|
||||
|
||||
|
||||
def test_server_registers_all_19_tools() -> None:
|
||||
app = build_mcp()
|
||||
tools = asyncio.run(app.list_tools())
|
||||
names = {tool.name for tool in tools}
|
||||
|
||||
assert len(names) == 19
|
||||
assert "civilplan_parse_project" in names
|
||||
assert "civilplan_generate_dxf_drawing" in names
|
||||
|
||||
|
||||
def test_read_tools_have_read_only_hint() -> None:
|
||||
app = build_mcp()
|
||||
tools = {tool.name: tool for tool in asyncio.run(app.list_tools())}
|
||||
|
||||
assert tools["civilplan_parse_project"].annotations.readOnlyHint is True
|
||||
assert tools["civilplan_generate_boq_excel"].annotations.readOnlyHint is None
|
||||
Reference in New Issue
Block a user