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