msys2-web/tests/conftest.py
Christoph Reiter 1c703c66d7 Add an example MCP server
Only provides one tool for vercmp() as a test.

Since the mcp session can only be instanciated once I needed to
adjust the test client usage in the test suite a bit and make
it a shared session fixture.
2025-07-06 17:32:20 +02:00

17 lines
285 B
Python

# type: ignore
import os
import pytest
from fastapi.testclient import TestClient
os.environ["NO_MIDDLEWARE"] = "1"
from app import app
@pytest.fixture(scope="session")
def client():
os.environ["NO_UPDATE_THREAD"] = "1"
with TestClient(app) as client:
yield client