17 lines
438 B
Python
17 lines
438 B
Python
import httpx
|
|
import pytest_asyncio
|
|
|
|
from endpoint_monitor.config import Settings
|
|
from endpoint_monitor.main import create_app
|
|
|
|
|
|
@pytest_asyncio.fixture
|
|
async def app():
|
|
return create_app(Settings(max_monitors=10, request_timeout_seconds=1, max_redirects=2))
|
|
|
|
|
|
@pytest_asyncio.fixture
|
|
async def client(app):
|
|
async with httpx.AsyncClient(transport=httpx.ASGITransport(app=app), base_url="http://test") as value:
|
|
yield value
|