Example #1
0
def app(request):
    """Session-wide test `Flask` application."""
    app = create_app()
    app.config['TESTING'] = True
    app.config['SQLALCHEMY_DATABASE_URI'] = TEST_DATABASE_URI
    app.config['WTF_CSRF_ENABLED'] = False

    # Establish an application context before running the tests.
    ctx = app.app_context()
    ctx.push()

    def teardown():
        ctx.pop()

    request.addfinalizer(teardown)
    return app
Example #2
0
from gendb.app import create_app

app_init = create_app()