Пример #1
0
def app():
    """An application for the tests."""
    config = TestConfig()
    init_db(config.SQLALCHEMY_DATABASE_URI)
    _app = create_app(config)
    ctx = _app.test_request_context()
    ctx.push()

    yield _app

    ctx.pop()
Пример #2
0
def initdb():
    init_db(current_app.config["SQLALCHEMY_DATABASE_URI"])