# Path: farmsList/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: farmsList/settings.py
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     SQLALCHEMY_DATABASE_URI = os_env.get('HEROKU_POSTGRESQL_IVORY_URL')
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     HTTP_SERVER = "acres.herokuapp.com"
# 
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     MAIL_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 = 'postgresql://urbanlandlocatoradmin:@localhost/urban_land_locator' #'sqlite:///{0}'.format(DB_PATH)
#     DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     HTTP_SERVER = "localhost:5001"


from farmsList.app import create_app
from farmsList.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: farmsList/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: farmsList/settings.py
# class ProdConfig(Config):
#     """Production configuration."""
#     ENV = 'prod'
#     DEBUG = False
#     SQLALCHEMY_DATABASE_URI = os_env.get('HEROKU_POSTGRESQL_IVORY_URL')
#     DEBUG_TB_ENABLED = False  # Disable Debug toolbar
#     HTTP_SERVER = "acres.herokuapp.com"
# 
# class DevConfig(Config):
#     """Development configuration."""
#     ENV = 'dev'
#     DEBUG = True
#     MAIL_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 = 'postgresql://urbanlandlocatoradmin:@localhost/urban_land_locator' #'sqlite:///{0}'.format(DB_PATH)
#     DEBUG_TB_ENABLED = True
#     ASSETS_DEBUG = True  # Don't bundle/minify static assets
#     HTTP_SERVER = "localhost:5001"


# Path: tests/test_config.py
from farmsList.app import create_app
from farmsList.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)