Skip to content

Commit 1263f36

Browse files
committed
Update tests to reflect changes in tool counts and command registrations
- Modified expected command list in `test_main.py` to include new commands and remove outdated ones. - Updated assertions in `test_mcp_integration.py` to reflect the correct number of tools (29) based on the latest specifications. - Adjusted assertions in `test_mcp_server.py` to verify the correct number of tools (17 for read-only and 29 for writable) in accordance with updated specifications.
1 parent 66ffca4 commit 1263f36

3 files changed

Lines changed: 18 additions & 14 deletions

File tree

apps/aam-cli/tests/integration/test_mcp_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ async def check() -> None:
8181
_run_async(check())
8282

8383
def test_integration_full_access_has_all_tools(self) -> None:
84-
"""Full-access server should list all 23 tools (spec 002 + 003)."""
84+
"""Full-access server should list all 29 tools (spec 002–005)."""
8585
server = create_mcp_server(allow_write=True)
8686

8787
async def check() -> None:
8888
async with Client(server) as client:
8989
tools = await client.list_tools()
90-
assert len(tools) == 23
90+
assert len(tools) == 29
9191

9292
_run_async(check())
9393

apps/aam-cli/tests/test_main.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,22 @@ class TestCommandRegistration:
7878
"""Test that all expected commands are registered."""
7979

8080
EXPECTED_COMMANDS = [
81-
"build",
8281
"config",
83-
"create-package",
82+
"diff",
83+
"doctor",
8484
"info",
8585
"init",
8686
"install",
8787
"list",
88-
"pack",
89-
"publish",
88+
"mcp",
89+
"outdated",
90+
"pkg",
9091
"registry",
9192
"search",
93+
"source",
9294
"uninstall",
93-
"validate",
95+
"upgrade",
96+
"verify",
9497
]
9598

9699
def setup_method(self) -> None:

apps/aam-cli/tests/unit/test_mcp_server.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ def test_unit_create_server_default(self) -> None:
4343

4444
@pytest.mark.asyncio
4545
async def test_unit_create_server_read_only(self) -> None:
46-
"""Verify only 16 read tools listed when allow_write=False.
46+
"""Verify only 17 read tools listed when allow_write=False.
4747
4848
7 spec-002 read tools + 6 spec-003 read tools
4949
+ 2 spec-004 read tools (outdated, available)
50-
+ 1 spec-004 init info tool = 16.
50+
+ 1 spec-004 init info tool
51+
+ 1 spec-005 recommend tool = 17.
5152
"""
5253
server = create_mcp_server(allow_write=False)
5354
# -----
@@ -56,7 +57,7 @@ async def test_unit_create_server_read_only(self) -> None:
5657
async with Client(server) as client:
5758
tools = await client.list_tools()
5859
tool_names = [t.name for t in tools]
59-
assert len(tool_names) == 16
60+
assert len(tool_names) == 17
6061
# -----
6162
# Spec 002 read-only tools
6263
# -----
@@ -93,16 +94,16 @@ async def test_unit_create_server_read_only(self) -> None:
9394

9495
@pytest.mark.asyncio
9596
async def test_unit_create_server_allow_write(self) -> None:
96-
"""Verify all 28 tools listed when allow_write=True.
97+
"""Verify all 29 tools listed when allow_write=True.
9798
98-
16 read tools + 7 spec-002 write + 3 spec-003 write
99-
+ 1 spec-004 upgrade + 1 spec-004 init = 28.
99+
17 read tools + 7 spec-002 write + 3 spec-003 write
100+
+ 1 spec-004 upgrade + 1 spec-004 init = 29.
100101
"""
101102
server = create_mcp_server(allow_write=True)
102103
async with Client(server) as client:
103104
tools = await client.list_tools()
104105
tool_names = [t.name for t in tools]
105-
assert len(tool_names) == 28
106+
assert len(tool_names) == 29
106107
# -----
107108
# Check spec 002 write tools present
108109
# -----

0 commit comments

Comments
 (0)