Skip to content

Commit d8fc0e7

Browse files
committed
names
1 parent 7356a3f commit d8fc0e7

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tests/server/fastmcp/test_integration.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def run_server(server_port: int) -> None:
269269
server.run()
270270

271271

272-
def run_comprehensive_server(server_port: int) -> None:
272+
def run_everything_server(server_port: int) -> None:
273273
"""Run the comprehensive server with all features."""
274274
_, app = make_everything_fastmcp_app()
275275
server = uvicorn.Server(
@@ -494,38 +494,38 @@ async def test_fastmcp_stateless_streamable_http(
494494

495495
# Fixtures for comprehensive servers
496496
@pytest.fixture
497-
def comprehensive_server_port() -> int:
497+
def everything_server_port() -> int:
498498
"""Get a free port for testing the comprehensive server."""
499499
with socket.socket() as s:
500500
s.bind(("127.0.0.1", 0))
501501
return s.getsockname()[1]
502502

503503

504504
@pytest.fixture
505-
def comprehensive_server_url(comprehensive_server_port: int) -> str:
505+
def everything_server_url(everything_server_port: int) -> str:
506506
"""Get the comprehensive server URL for testing."""
507-
return f"http://127.0.0.1:{comprehensive_server_port}"
507+
return f"http://127.0.0.1:{everything_server_port}"
508508

509509

510510
@pytest.fixture
511-
def comprehensive_http_server_port() -> int:
511+
def everything_http_server_port() -> int:
512512
"""Get a free port for testing the comprehensive StreamableHTTP server."""
513513
with socket.socket() as s:
514514
s.bind(("127.0.0.1", 0))
515515
return s.getsockname()[1]
516516

517517

518518
@pytest.fixture
519-
def comprehensive_http_server_url(comprehensive_http_server_port: int) -> str:
519+
def everything_http_server_url(everything_http_server_port: int) -> str:
520520
"""Get the comprehensive StreamableHTTP server URL for testing."""
521-
return f"http://127.0.0.1:{comprehensive_http_server_port}"
521+
return f"http://127.0.0.1:{everything_http_server_port}"
522522

523523

524524
@pytest.fixture()
525-
def comprehensive_server(comprehensive_server_port: int) -> Generator[None, None, None]:
525+
def everything_server(everything_server_port: int) -> Generator[None, None, None]:
526526
"""Start the comprehensive server in a separate process and clean up after."""
527527
proc = multiprocessing.Process(
528-
target=run_comprehensive_server, args=(comprehensive_server_port,), daemon=True
528+
target=run_everything_server, args=(everything_server_port,), daemon=True
529529
)
530530
print("Starting comprehensive server process")
531531
proc.start()
@@ -537,7 +537,7 @@ def comprehensive_server(comprehensive_server_port: int) -> Generator[None, None
537537
while attempt < max_attempts:
538538
try:
539539
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
540-
s.connect(("127.0.0.1", comprehensive_server_port))
540+
s.connect(("127.0.0.1", everything_server_port))
541541
break
542542
except ConnectionRefusedError:
543543
time.sleep(0.1)
@@ -558,12 +558,12 @@ def comprehensive_server(comprehensive_server_port: int) -> Generator[None, None
558558

559559
@pytest.fixture()
560560
def comprehensive_streamable_http_server(
561-
comprehensive_http_server_port: int,
561+
everything_http_server_port: int,
562562
) -> Generator[None, None, None]:
563563
"""Start the comprehensive StreamableHTTP server in a separate process."""
564564
proc = multiprocessing.Process(
565565
target=run_comprehensive_streamable_http_server,
566-
args=(comprehensive_http_server_port,),
566+
args=(everything_http_server_port,),
567567
daemon=True,
568568
)
569569
print("Starting comprehensive StreamableHTTP server process")
@@ -576,7 +576,7 @@ def comprehensive_streamable_http_server(
576576
while attempt < max_attempts:
577577
try:
578578
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
579-
s.connect(("127.0.0.1", comprehensive_http_server_port))
579+
s.connect(("127.0.0.1", everything_http_server_port))
580580
break
581581
except ConnectionRefusedError:
582582
time.sleep(0.1)
@@ -631,7 +631,7 @@ async def handle_generic_notification(self, message) -> None:
631631

632632
@pytest.mark.anyio
633633
async def test_fastmcp_all_features_sse(
634-
comprehensive_server: None, comprehensive_server_url: str
634+
everything_server: None, everything_server_url: str
635635
) -> None:
636636
"""Test all MCP features work correctly with SSE transport."""
637637

@@ -658,7 +658,7 @@ async def sampling_callback(
658658
)
659659

660660
# Connect to the server with callbacks
661-
async with sse_client(comprehensive_server_url + "/sse") as streams:
661+
async with sse_client(everything_server_url + "/sse") as streams:
662662
# Set up message handler to capture notifications
663663
async def message_handler(message):
664664
print(f"Received message: {message}")
@@ -674,7 +674,7 @@ async def message_handler(message):
674674
# Test initialization
675675
result = await session.initialize()
676676
assert isinstance(result, InitializeResult)
677-
assert result.serverInfo.name == "AllFeaturesServer"
677+
assert result.serverInfo.name == "EverythingServer"
678678

679679
# Check server features are reported
680680
assert result.capabilities.prompts is not None
@@ -847,7 +847,7 @@ def progress_callback(
847847

848848
@pytest.mark.anyio
849849
async def test_fastmcp_all_features_streamable_http(
850-
comprehensive_streamable_http_server: None, comprehensive_http_server_url: str
850+
comprehensive_streamable_http_server: None, everything_http_server_url: str
851851
) -> None:
852852
"""Test all MCP features work correctly with StreamableHTTP transport."""
853853

@@ -874,7 +874,7 @@ async def sampling_callback(
874874
)
875875

876876
# Connect to the server using StreamableHTTP
877-
async with streamablehttp_client(comprehensive_http_server_url + "/mcp") as (
877+
async with streamablehttp_client(everything_http_server_url + "/mcp") as (
878878
read_stream,
879879
write_stream,
880880
_,
@@ -895,7 +895,7 @@ async def message_handler(message):
895895
# Test initialization
896896
result = await session.initialize()
897897
assert isinstance(result, InitializeResult)
898-
assert result.serverInfo.name == "AllFeaturesServer"
898+
assert result.serverInfo.name == "EverythingServer"
899899

900900
# Check server features are reported
901901
assert result.capabilities.prompts is not None

0 commit comments

Comments
 (0)