Some checks are pending
CI / backend-lint-and-test (push) Waiting to run
- FastAPI with async SQLAlchemy models for IFC elements - IFC file upload and parsing via IfcOpenShell - REST API for projects, elements, and properties - Vue.js 3 frontend shell with Three.js dependency - Docker Compose for full-stack local development - PostgreSQL 16 as database - CI pipeline for Forgejo Actions - Project documentation and API overview
17 lines
440 B
Python
17 lines
440 B
Python
"""Test the health check endpoint."""
|
|
|
|
import pytest
|
|
from httpx import ASGITransport, AsyncClient
|
|
|
|
from app.main import app
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_health_returns_ok():
|
|
transport = ASGITransport(app=app)
|
|
async with AsyncClient(transport=transport, base_url="http://test") as client:
|
|
response = await client.get("/health")
|
|
|
|
assert response.status_code == 200
|
|
assert response.json() == {"status": "ok"}
|
|
|