A fast, zero-network test that guards against accidental tool deletions or regressions in MCP tool registration.
Implementation
File: tests/smoke/test_registration.py
fromserver.gitea_mcpimportmcpEXPECTED_TOOL_COUNT=66deftest_all_tools_registered():tools=mcp.list_tools()assertlen(tools)==EXPECTED_TOOL_COUNT,(f"Expected {EXPECTED_TOOL_COUNT} tools, found {len(tools)}. ""Update EXPECTED_TOOL_COUNT in this test and the count in README.md.")deftest_tool_names_unique():tools=mcp.list_tools()names=[t.namefortintools]assertlen(names)==len(set(names)),"Duplicate tool names detected"
Acceptance criteria
Test passes with current 66 tools
Adding a tool without updating the constant causes a clear failure message
Runs in < 1 s (no I/O)
## Goal
A fast, zero-network test that guards against accidental tool deletions or regressions in MCP tool registration.
## Implementation
File: `tests/smoke/test_registration.py`
```python
from server.gitea_mcp import mcp
EXPECTED_TOOL_COUNT = 66
def test_all_tools_registered():
tools = mcp.list_tools()
assert len(tools) == EXPECTED_TOOL_COUNT, (
f"Expected {EXPECTED_TOOL_COUNT} tools, found {len(tools)}. "
"Update EXPECTED_TOOL_COUNT in this test and the count in README.md."
)
def test_tool_names_unique():
tools = mcp.list_tools()
names = [t.name for t in tools]
assert len(names) == len(set(names)), "Duplicate tool names detected"
```
## Acceptance criteria
- Test passes with current 66 tools
- Adding a tool without updating the constant causes a clear failure message
- Runs in < 1 s (no I/O)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Goal
A fast, zero-network test that guards against accidental tool deletions or regressions in MCP tool registration.
Implementation
File:
tests/smoke/test_registration.pyAcceptance criteria