# Path: seoul_serenity/app.py
# def create_app(config_object=ProdConfig):
#     '''An application factory, as explained here:
#         http://flask.pocoo.org/docs/patterns/appfactories/
# 
#     :param config_object: The configuration object to use.
#     '''
#     app = Flask(__name__)
#     app.config.from_object(config_object)
#     register_extensions(app)
#     register_blueprints(app)
#     register_errorhandlers(app)
#     return app
# 
# Path: seoul_serenity/settings.py
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     # TODO 서영태 : heroku에서는 DATABASE_URL로 매팅
#     # SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/example'  # TODO: Change me
#     SQLALCHEMY_DATABASE_URI = os_env['DATABASE_URL']
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
# 
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     DB_NAME = 'dev.db'
#     # Put the db file in project root
#     DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
#     SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH)
#     DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     CACHE_TYPE = 'simple'  # Can be "memcached", "redis", etc.


from seoul_serenity.app import create_app
from seoul_serenity.settings import ProdConfig, DevConfig
# -*- coding: utf-8 -*-

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():

# Path: seoul_serenity/app.py
# def create_app(config_object=ProdConfig):
#     '''An application factory, as explained here:
#         http://flask.pocoo.org/docs/patterns/appfactories/
# 
#     :param config_object: The configuration object to use.
#     '''
#     app = Flask(__name__)
#     app.config.from_object(config_object)
#     register_extensions(app)
#     register_blueprints(app)
#     register_errorhandlers(app)
#     return app
# 
# Path: seoul_serenity/settings.py
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     # TODO 서영태 : heroku에서는 DATABASE_URL로 매팅
#     # SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/example'  # TODO: Change me
#     SQLALCHEMY_DATABASE_URI = os_env['DATABASE_URL']
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
# 
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     DB_NAME = 'dev.db'
#     # Put the db file in project root
#     DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
#     SQLALCHEMY_DATABASE_URI = 'sqlite:///{0}'.format(DB_PATH)
#     DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     CACHE_TYPE = 'simple'  # Can be "memcached", "redis", etc.


# Path: tests/test_config.py
from seoul_serenity.app import create_app
from seoul_serenity.settings import ProdConfig, DevConfig

# -*- coding: utf-8 -*-

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)