# Path: solarpi/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: solarpi/settings.py
# class ProdConfig(Config):
#     """Production configuration."""
# 
#     ENV = "prod"
#     DEBUG = False
#     DB_NAME = "app.db"
#     DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
#     SQLALCHEMY_DATABASE_URI = "sqlite:///{0}".format(DB_PATH)
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     SENTRY_DNS = os_env.get("SENTRY_DNS", None)
# 
# class DevConfig(Config):
#     """Development configuration."""
# 
#     ENV = "dev"
#     DEBUG = True
#     DB_NAME = "dev.db"
#     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 solarpi.app import create_app
from solarpi.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: solarpi/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: solarpi/settings.py
# class ProdConfig(Config):
#     """Production configuration."""
# 
#     ENV = "prod"
#     DEBUG = False
#     DB_NAME = "app.db"
#     DB_PATH = os.path.join(Config.PROJECT_ROOT, DB_NAME)
#     SQLALCHEMY_DATABASE_URI = "sqlite:///{0}".format(DB_PATH)
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     SENTRY_DNS = os_env.get("SENTRY_DNS", None)
# 
# class DevConfig(Config):
#     """Development configuration."""
# 
#     ENV = "dev"
#     DEBUG = True
#     DB_NAME = "dev.db"
#     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 solarpi.app import create_app
from solarpi.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)