- Add Spanish documentation for AGENTS.md and README.md - Add pytest to main dependencies and taskipy for dev tasks - Clean up unused imports across codebase - Fix default config values for local development - Update test fixtures to use standard pytest
25 lines
489 B
Python
25 lines
489 B
Python
import pytest
|
|
from unittest.mock import MagicMock, patch
|
|
from fastmcp import Client
|
|
|
|
|
|
@pytest.fixture
|
|
def mock_settings():
|
|
with patch("tryton_mcp.server.settings") as mock:
|
|
mock_client = MagicMock()
|
|
mock.get_client.return_value = mock_client
|
|
yield mock
|
|
|
|
|
|
@pytest.fixture
|
|
def mcp_server():
|
|
from tryton_mcp.server import mcp
|
|
|
|
return mcp
|
|
|
|
|
|
@pytest.fixture
|
|
async def mcp_client(mcp_server):
|
|
async with Client(mcp_server) as client:
|
|
yield client
|