|
2 | 2 |
|
3 | 3 | from logging import Logger |
4 | 4 |
|
| 5 | +from pydantic import AnyHttpUrl |
5 | 6 | from pytest_mock import MockerFixture |
6 | 7 |
|
7 | 8 | import pytest |
@@ -37,10 +38,11 @@ async def test_register_mcp_servers_empty_list(mocker: MockerFixture) -> None: |
37 | 38 | workers=10, |
38 | 39 | color_log=True, |
39 | 40 | access_log=True, |
| 41 | + root_path="/.", |
40 | 42 | ), |
41 | 43 | llama_stack=LlamaStackConfiguration( |
42 | 44 | use_as_library_client=False, |
43 | | - url="http://localhost:8321", |
| 45 | + url=AnyHttpUrl("http://localhost:8321"), |
44 | 46 | library_client_config_path=None, |
45 | 47 | api_key=None, |
46 | 48 | timeout=60, |
@@ -98,10 +100,11 @@ async def test_register_mcp_servers_single_server_not_registered( |
98 | 100 | workers=10, |
99 | 101 | color_log=True, |
100 | 102 | access_log=True, |
| 103 | + root_path="/.", |
101 | 104 | ), |
102 | 105 | llama_stack=LlamaStackConfiguration( |
103 | 106 | use_as_library_client=False, |
104 | | - url="http://localhost:8321", |
| 107 | + url=AnyHttpUrl("http://localhost:8321"), |
105 | 108 | library_client_config_path=None, |
106 | 109 | api_key=None, |
107 | 110 | timeout=60, |
@@ -161,10 +164,11 @@ async def test_register_mcp_servers_single_server_already_registered( |
161 | 164 | workers=10, |
162 | 165 | color_log=True, |
163 | 166 | access_log=True, |
| 167 | + root_path="/.", |
164 | 168 | ), |
165 | 169 | llama_stack=LlamaStackConfiguration( |
166 | 170 | use_as_library_client=False, |
167 | | - url="http://localhost:8321", |
| 171 | + url=AnyHttpUrl("http://localhost:8321"), |
168 | 172 | library_client_config_path=None, |
169 | 173 | api_key=None, |
170 | 174 | timeout=60, |
@@ -233,10 +237,11 @@ async def test_register_mcp_servers_multiple_servers_mixed_registration( |
233 | 237 | workers=10, |
234 | 238 | color_log=True, |
235 | 239 | access_log=True, |
| 240 | + root_path="/.", |
236 | 241 | ), |
237 | 242 | llama_stack=LlamaStackConfiguration( |
238 | 243 | use_as_library_client=False, |
239 | | - url="http://localhost:8321", |
| 244 | + url=AnyHttpUrl("http://localhost:8321"), |
240 | 245 | library_client_config_path=None, |
241 | 246 | api_key=None, |
242 | 247 | timeout=60, |
@@ -304,10 +309,11 @@ async def test_register_mcp_servers_with_custom_provider(mocker: MockerFixture) |
304 | 309 | workers=10, |
305 | 310 | color_log=True, |
306 | 311 | access_log=True, |
| 312 | + root_path="/.", |
307 | 313 | ), |
308 | 314 | llama_stack=LlamaStackConfiguration( |
309 | 315 | use_as_library_client=False, |
310 | | - url="http://localhost:8321", |
| 316 | + url=AnyHttpUrl("http://localhost:8321"), |
311 | 317 | library_client_config_path=None, |
312 | 318 | api_key=None, |
313 | 319 | timeout=60, |
@@ -375,6 +381,7 @@ async def test_register_mcp_servers_async_with_library_client( |
375 | 381 | workers=10, |
376 | 382 | color_log=True, |
377 | 383 | access_log=True, |
| 384 | + root_path="/.", |
378 | 385 | ), |
379 | 386 | llama_stack=LlamaStackConfiguration( |
380 | 387 | use_as_library_client=True, |
|
0 commit comments