Esempio n. 1
0
def app():
    """
    Fixture for making Session-wide test application
    """
    my_app = create_app()
    with my_app.app_context():
        DBH.init_app(my_app)
        yield my_app
Esempio n. 2
0
def initialize_extensions(app):
    """
    Method to wrap up all extensions that require initialization
    """
    # configure logging
    logging.info("before config")
    dictConfig(LOGGINGCONFIG)
    logging.info("after config")
    # Setup Flask-SQLAlchemy
    from worbliportal.database import DBH
    DBH.init_app(app)
    # Setup bcrypt for use in users
    from worbliportal.models import BCRYPT
    BCRYPT.init_app(app)

    # Setup Flask-Migrate
    MIGRATE.init_app(app, DBH)

    # Setup Flask-Mail
    from worbliportal.mail import MAIL
    MAIL.init_app(app)
    """