91e75e620b
CI: cua-driver distro-compat matrix / Resolve release version (push) Waiting to run
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / Distro compat summary (push) Blocked by required conditions
CI: Nix Linux Rust source / Nix / compositor build (push) Waiting to run
CI: Nix Linux Rust source / Nix / driver package (push) Waiting to run
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Waiting to run
CI: Rust Linux unit / Rust Linux unit and compile (push) Waiting to run
CI: Rust Windows unit / Rust Windows unit and compile (push) Waiting to run
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Waiting to run
CD: Docs MCP Server / build (linux/amd64) (push) Waiting to run
CD: Docs MCP Server / build (linux/arm64) (push) Waiting to run
CD: Docs MCP Server / merge (push) Blocked by required conditions
45 lines
1.4 KiB
Python
45 lines
1.4 KiB
Python
"""Unit tests for mcp-server package.
|
|
|
|
This file tests ONLY basic MCP server functionality.
|
|
Following SRP: This file tests MCP server initialization.
|
|
All external dependencies are mocked.
|
|
"""
|
|
|
|
from unittest.mock import AsyncMock, Mock, patch
|
|
|
|
import pytest
|
|
|
|
|
|
class TestMCPServerImports:
|
|
"""Test MCP server module imports (SRP: Only tests imports)."""
|
|
|
|
def test_mcp_server_module_exists(self):
|
|
"""Test that mcp_server module can be imported."""
|
|
try:
|
|
import mcp_server
|
|
|
|
assert mcp_server is not None
|
|
except ImportError:
|
|
pytest.skip("mcp_server module not installed")
|
|
except SystemExit:
|
|
pytest.skip("MCP dependencies (mcp.server.fastmcp) not available")
|
|
|
|
|
|
class TestMCPServerInitialization:
|
|
"""Test MCP server initialization (SRP: Only tests initialization)."""
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_mcp_server_can_be_imported(self):
|
|
"""Basic smoke test: verify MCP server components can be imported."""
|
|
try:
|
|
from mcp_server import server
|
|
|
|
assert server is not None
|
|
except ImportError:
|
|
pytest.skip("MCP server module not available")
|
|
except SystemExit:
|
|
pytest.skip("MCP dependencies (mcp.server.fastmcp) not available")
|
|
except Exception as e:
|
|
# Some initialization errors are acceptable in unit tests
|
|
pytest.skip(f"MCP server initialization requires specific setup: {e}")
|