22 lines
581 B
Python
22 lines
581 B
Python
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
|