예제 #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
예제 #2
0
파일: __init__.py 프로젝트: vlttnv/gendb
from gendb.app import create_app

app_init = create_app()