Files
prompts/tests/conftest.py
T
2026-08-29 22:28:55 -05:00

19 lines
451 B
Python

from collections.abc import AsyncIterator
import pytest
from asgi_lifespan import LifespanManager
from fastmcp.utilities.tests import ASGIServer
from personal_mcp.app import create_app
@pytest.fixture
async def http_server() -> AsyncIterator[ASGIServer]:
app = create_app()
async with LifespanManager(app):
yield ASGIServer(
url="http://127.0.0.1/mcp",
app=app,
transport_type="http",
)