summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/taskwarrior/tests/conftest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/servers/taskwarrior/tests/conftest.py b/servers/taskwarrior/tests/conftest.py
index 5a36cc1..3ff4c0f 100644
--- a/servers/taskwarrior/tests/conftest.py
+++ b/servers/taskwarrior/tests/conftest.py
@@ -6,22 +6,25 @@ from unittest.mock import AsyncMock, MagicMock
import pytest
# Add the src directory to the Python path for testing
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../src')))
+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../src")))
# Mock the mcp.server.remote module
mock_remote = MagicMock()
mock_remote.serve_remote = AsyncMock()
-sys.modules['mcp.server.remote'] = mock_remote
+sys.modules["mcp.server.remote"] = mock_remote
if TYPE_CHECKING:
from mcp_server_taskwarrior.server import TaskWarriorServer
+
@pytest.fixture
def taskwarrior_server() -> "TaskWarriorServer":
"""Create a TaskWarriorServer instance for testing."""
from mcp_server_taskwarrior.server import TaskWarriorServer
+
return TaskWarriorServer()
+
@pytest.fixture
def mcp_server_mock() -> MagicMock:
"""Create a mock MCP Server instance with all handlers."""