shinkan-jinkendo/backend/tests/test_dashboard_kpis.py

22 lines
448 B
Python
Raw Normal View History

"""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