rebuild(stage-3): establish accounts permissions and secure settings

This commit is contained in:
leefer
2026-07-30 01:33:19 +08:00
parent 2ff35eb6df
commit f69972c3c0
31 changed files with 2742 additions and 18 deletions
+8
View File
@@ -32,3 +32,11 @@ def test_test_settings_do_not_create_log_files(tmp_path: Path) -> None:
assert settings.log_file is None
assert settings.database_path.parent == tmp_path
def test_production_requires_encryption_key(monkeypatch) -> None:
monkeypatch.setenv("APP_ENV", "production")
monkeypatch.delenv("APP_ENCRYPTION_KEY", raising=False)
with pytest.raises(ConfigurationError, match="APP_ENCRYPTION_KEY"):
Settings.from_environment()