From 1018859800380f68e0bcef97b8372ede79567480 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Sat, 19 Apr 2014 15:59:01 -0400 Subject: [PATCH] Add config tests --- {{cookiecutter.app_name}}/tests/test_config.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 {{cookiecutter.app_name}}/tests/test_config.py diff --git a/{{cookiecutter.app_name}}/tests/test_config.py b/{{cookiecutter.app_name}}/tests/test_config.py new file mode 100644 index 0000000..691f5f6 --- /dev/null +++ b/{{cookiecutter.app_name}}/tests/test_config.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +from {{cookiecutter.app_name}}.app import create_app +from {{cookiecutter.app_name}}.settings import ProdConfig, DevConfig + +def test_production_config(): + app = create_app(ProdConfig) + assert app.config['ENV'] == 'prod' + assert app.config['DEBUG'] is False + assert app.config['DEBUG_TB_ENABLED'] is False + assert app.config['ASSETS_DEBUG'] is False + + +def test_dev_config(): + app = create_app(DevConfig) + assert app.config['ENV'] == 'dev' + assert app.config['DEBUG'] is True + assert app.config['ASSETS_DEBUG'] is True