feat: Quart app factory with health endpoint

This commit is contained in:
2026-03-17 18:55:15 -04:00
parent ff8489f758
commit 5c25953929
9 changed files with 161 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import pytest
from fablednetmon.app import create_app
@pytest.mark.asyncio
async def test_create_app_returns_quart_app(config_file):
from quart import Quart
app = create_app(config_path=config_file, testing=True)
assert isinstance(app, Quart)
@pytest.mark.asyncio
async def test_app_has_db_sessionmaker(config_file):
app = create_app(config_path=config_file, testing=True)
assert hasattr(app, "db_sessionmaker")
@pytest.mark.asyncio
async def test_health_endpoint(client):
response = await client.get("/health")
assert response.status_code == 200