gmao/tests/unit/test_production_config.py
root 785c8aabcb
Some checks are pending
CI - Tests et Syntax / lint-and-test (push) Waiting to run
Refondre le RBAC multi-roles et securiser les acces
2026-08-21 16:46:19 +00:00

16 lines
459 B
Python

from pathlib import Path
from app_new import create_app
def test_production_configuration_is_secure():
app = create_app('production')
assert app.config['DEBUG'] is False
assert app.config['SESSION_COOKIE_SECURE'] is True
assert app.config['WTF_CSRF_ENABLED'] is True
def test_wsgi_uses_production_factory():
source = Path(__file__).resolve().parents[2].joinpath('wsgi.py').read_text()
assert "create_app('production')" in source