diff --git a/tests/conftest.py b/tests/conftest.py index 4016ff0..3a0a506 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1 +1,16 @@ -# Env var setup that must run before app.config is imported. +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