rebuild(stage-3): establish accounts permissions and secure settings
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user