feat: harden production data and backups
This commit is contained in:
@@ -13,6 +13,7 @@ def production_settings(**changes) -> Settings:
|
||||
"s3_secret_key": "s" * 32,
|
||||
"s3_public_endpoint_url": "https://files.rf4spotter.ru",
|
||||
"cors_origins": ["https://rf4spotter.ru"],
|
||||
"seed_demo_data": False,
|
||||
}
|
||||
return Settings(**(values | changes))
|
||||
|
||||
@@ -30,6 +31,7 @@ def test_production_settings_accept_real_domains_and_secrets() -> None:
|
||||
("s3_secret_key", "rf4-local-secret"),
|
||||
("cors_origins", ["http://rf4spotter.ru"]),
|
||||
("s3_public_endpoint_url", "http://files.rf4spotter.ru"),
|
||||
("seed_demo_data", True),
|
||||
])
|
||||
def test_production_settings_reject_insecure_values(field: str, value: object) -> None:
|
||||
with pytest.raises(ValidationError):
|
||||
|
||||
Reference in New Issue
Block a user