# Path: boiler/bootstrap.py
# def get_config():
# def get_app():
# def test_import_name(name):
# def create_app(name, config=None, flask_params=None):
#     def detect_dev_proxy():
# def add_routing(app):
# def add_mail(app):
# def add_orm(app):
# def add_logging(app):
# def add_localization(app):
# 
# Path: boiler/config.py
# class TestingConfig(Config):
#     """ Default testing config """
#     ENV = 'testing'
#     TESTING = True
#     MAIL_DEBUG = True
# 
#     # use sqlite in testing
#     test_db = 'sqlite:///{}'.format(DefaultConfig.TEST_DB_PATH)
#     SQLALCHEMY_DATABASE_URI = test_db
# 
#     # hash quickly in testing
#     WTF_CSRF_ENABLED = False
#     PASSLIB_ALGO = 'md5_crypt'


from boiler import bootstrap
from boiler.config import TestingConfig
This is not a real application, we only use it to run tests against.

Templates resolution
Default template location for flask apps is wherever the application module is 
located. This is alright for regular applications because we bootstrap them from 
their root, but for testing application our template root becomes 
boiler/tests/templates. There is however a way to set up application root path 
on the flask app.

In order for it to be able to find default boiler templates, we will need to set 
templates directory, otherwise it will automagically resolve to this file's 
parent dir.

On how flask resolves template path see 'template_folder' here:
@see http://flask.pocoo.org/docs/0.12/api/
"""


# set path to boiler templates (test app only)
flask_params = dict(template_folder='../../templates')

# create app
app = bootstrap.create_app(
    __name__,
    config=TestingConfig(),
    flask_params=flask_params
)

bootstrap.add_orm(app)
bootstrap.add_mail(app)

# Path: boiler/bootstrap.py
# def get_config():
# def get_app():
# def test_import_name(name):
# def create_app(name, config=None, flask_params=None):
#     def detect_dev_proxy():
# def add_routing(app):
# def add_mail(app):
# def add_orm(app):
# def add_logging(app):
# def add_localization(app):
# 
# Path: boiler/config.py
# class TestingConfig(Config):
#     """ Default testing config """
#     ENV = 'testing'
#     TESTING = True
#     MAIL_DEBUG = True
# 
#     # use sqlite in testing
#     test_db = 'sqlite:///{}'.format(DefaultConfig.TEST_DB_PATH)
#     SQLALCHEMY_DATABASE_URI = test_db
# 
#     # hash quickly in testing
#     WTF_CSRF_ENABLED = False
#     PASSLIB_ALGO = 'md5_crypt'


# Path: tests/boiler_test_app/app.py
from boiler import bootstrap
from boiler.config import TestingConfig

This is not a real application, we only use it to run tests against.

Templates resolution
Default template location for flask apps is wherever the application module is 
located. This is alright for regular applications because we bootstrap them from 
their root, but for testing application our template root becomes 
boiler/tests/templates. There is however a way to set up application root path 
on the flask app.

In order for it to be able to find default boiler templates, we will need to set 
templates directory, otherwise it will automagically resolve to this file's 
parent dir.

On how flask resolves template path see 'template_folder' here:
@see http://flask.pocoo.org/docs/0.12/api/
"""


# set path to boiler templates (test app only)
flask_params = dict(template_folder='../../templates')

# create app
app = bootstrap.create_app(
    __name__,
    config=TestingConfig(),
    flask_params=flask_params
)

bootstrap.add_orm(app)
bootstrap.add_mail(app)

bootstrap.add_routing(app)