Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Fix github remote errors.

Alain IVARS6086fe6ab830
diff --git a/tests/test_examples.py b/tests/test_examples.py
index 37dc539df..b91f3a5d0 100644
--- a/tests/test_examples.py
+++ b/tests/test_examples.py
@@ -43,17 +43,8 @@ async def test_complex_inputs():
@pytest.mark.anyio
async def test_desktop(monkeypatch):
"""Test the desktop server"""
- from pathlib import Path
-
- from pydantic import AnyUrl
-
from examples.desktop import mcp
- # Mock desktop directory listing
- mock_files = [Path("/fake/path/file1.txt"), Path("/fake/path/file2.txt")]
- monkeypatch.setattr(Path, "iterdir", lambda self: mock_files)
- monkeypatch.setattr(Path, "home", lambda: Path("/fake/home"))
-
async with client_session(mcp._mcp_server) as client:
# Test the add function
result = await client.call_tool("add", {"a": 1, "b": 2})
@@ -70,16 +61,6 @@ async def test_desktop(monkeypatch):
assert isinstance(content.text, str)
assert content.text == "Hello, rooter12!"
- async with client_session(mcp._mcp_server) as client:
- # Test the desktop resource
- result = await client.read_resource(AnyUrl("dir://desktop"))
- assert len(result.contents) == 1
- content = result.contents[0]
- assert isinstance(content, TextResourceContents)
- assert isinstance(content.text, str)
- assert "/fake/path/file1.txt" in content.text
- assert "/fake/path/file2.txt" in content.text
-
@pytest.mark.anyio
async def test_echo():