Skip to content

Commit e7ec1d1

Browse files
committed
Merge pull request 'chore: update test' (#477) from add-url-info into main
Reviewed-on: https://git.biggo.com/Funmula/dive-mcp-host/pulls/477
2 parents 934affe + 98b866a commit e7ec1d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/httpd/routers/test_tools.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def __init__(self, name: str, description: str | None = None, enable: bool = Tru
2929
class MockServerInfo:
3030
"""Mock server info class."""
3131

32-
def __init__(self, tools=None, error=None):
32+
def __init__(self, tools=None, error=None, url: str | None = None):
3333
self.tools = tools or []
34+
self.url = url
3435
self.error_str = error
3536

3637

@@ -89,11 +90,12 @@ def test_list_tools_mock_cache(
8990
(client, _) = test_client
9091
mock_mcp_server_info.return_value = {
9192
"test_tool": MockServerInfo(
93+
url="http://localhost:8080/mcp",
9294
tools=[
9395
MockTool(
9496
name="test_tool", description="Test tool description", enable=True
9597
)
96-
]
98+
],
9799
)
98100
}
99101
mocked_cache = MagicMock()
@@ -116,6 +118,7 @@ def test_list_tools_mock_cache(
116118
"enabled": False,
117119
"icon": "",
118120
"tools": [],
121+
"url": None,
119122
"error": None,
120123
},
121124
{
@@ -125,6 +128,7 @@ def test_list_tools_mock_cache(
125128
],
126129
"description": "",
127130
"enabled": True,
131+
"url": "http://localhost:8080/mcp",
128132
"icon": "",
129133
"error": None,
130134
},

0 commit comments

Comments
 (0)