Files
qtalker---/backend/tests/test_config.py
Indiana d2f4c0a993 fix: remove unused SESSION_SECRET config
Session security already comes from a cryptographically random
256-bit token (secrets.token_urlsafe) hashed before storage —
SESSION_SECRET was required config that nothing ever read.
2026-07-21 03:43:08 +00:00

11 lines
437 B
Python

from app.config import Settings
def test_settings_load_from_env(monkeypatch):
monkeypatch.setenv("DATABASE_URL", "postgresql+asyncpg://u:p@host/db")
monkeypatch.setenv("OLLAMA_BASE_URL", "http://10.30.20.107:11434")
settings = Settings(_env_file=None)
assert settings.database_url == "postgresql+asyncpg://u:p@host/db"
assert settings.ollama_base_url == "http://10.30.20.107:11434"
assert settings.port == 7777