fix: add src to pythonpath for pytest
This commit is contained in:
parent
4aaa975fbc
commit
f1a89366e2
|
|
@ -0,0 +1,3 @@
|
|||
httpx==0.28.1
|
||||
pytest==8.2.0
|
||||
pytest-asyncio==0.23.6
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import pytest
|
||||
from httpx import AsyncClient, ASGITransport
|
||||
|
||||
from src.services.app.main import app
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_healthz():
|
||||
transport = ASGITransport(app=app, raise_app_exceptions=True)
|
||||
async with AsyncClient(transport=transport, base_url="http://test") as ac:
|
||||
resp = await ac.get("/healthz")
|
||||
assert resp.status_code == 200
|
||||
assert resp.json() == {"status": "pong"}
|
||||
Loading…
Reference in New Issue