22 lines
448 B
Python
22 lines
448 B
Python
|
|
"""GET /api/dashboard/kpis: Auth (kein DB nötig)."""
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
import os
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
from fastapi.testclient import TestClient
|
||
|
|
|
||
|
|
os.environ.setdefault("SKIP_DB_MIGRATE", "1")
|
||
|
|
|
||
|
|
from main import app
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.fixture
|
||
|
|
def client() -> TestClient:
|
||
|
|
return TestClient(app)
|
||
|
|
|
||
|
|
|
||
|
|
def test_dashboard_kpis_unauthenticated_401(client: TestClient) -> None:
|
||
|
|
r = client.get("/api/dashboard/kpis")
|
||
|
|
assert r.status_code == 401
|