feat: add FastAPI app factory and health check endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 09:12:31 -06:00
parent fb4b948681
commit b3b34222c8
6 changed files with 156 additions and 2 deletions

View File

@@ -11,10 +11,14 @@ class TestSettings:
def test_settings_loads_defaults(self) -> None:
"""Settings should have sensible defaults for all fields."""
with patch.dict(os.environ, {
env = {
"ADMIN_USERNAME": "testadmin",
"ADMIN_PASSWORD": "testpass123",
}, clear=False):
}
# Remove DATABASE_URL so we test the actual default
env_clean = {k: v for k, v in os.environ.items() if k != "DATABASE_URL"}
env_clean.update(env)
with patch.dict(os.environ, env_clean, clear=True):
settings = Settings()
assert settings.admin_username == "testadmin"
assert settings.admin_password == "testpass123"