mirror of
https://git.zavage.net/Zavage-Software/smileyface.git
synced 2026-06-25 18:12:48 -06:00
test: add AppSettings defaults and env-parsing smoke tests
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f6bbb550d8
commit
a63935e17d
16
tests/test_settings.py
Normal file
16
tests/test_settings.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from smileyface.settings import AppSettings
|
||||||
|
|
||||||
|
|
||||||
|
def test_defaults():
|
||||||
|
settings = AppSettings(_env_file=None)
|
||||||
|
assert settings.sqlite_filename == "smiles.db"
|
||||||
|
assert settings.skip_validate is False
|
||||||
|
assert settings.project_dir == ""
|
||||||
|
|
||||||
|
|
||||||
|
def test_env_overrides(monkeypatch):
|
||||||
|
monkeypatch.setenv("SMILEYFACE_PROJECT_DIR", "/srv/ut4")
|
||||||
|
monkeypatch.setenv("SMILEYFACE_SKIP_VALIDATE", "true")
|
||||||
|
settings = AppSettings(_env_file=None)
|
||||||
|
assert settings.project_dir == "/srv/ut4"
|
||||||
|
assert settings.skip_validate is True
|
||||||
Loading…
Reference in New Issue
Block a user