Files
portfolio-hub/tests/test_app.py
T

28 lines
583 B
Python

from fastapi.testclient import TestClient
from app.core.config import get_settings
from app.main import app
def test_healthcheck() -> None:
client = TestClient(app)
response = client.get("/health")
assert response.status_code == 200
assert response.json() == {"status": "ok"}
def test_docs_are_exposed() -> None:
client = TestClient(app)
response = client.get("/docs")
assert response.status_code == 200
def test_settings_default_origin() -> None:
settings = get_settings()
assert settings.allowed_origins == ["http://localhost:3000"]