示例#1
0
def init_db(app):
    """ Initialize the test database """

    db.drop_all()
    db.create_all()
    yield db
    db.session.close()
示例#2
0
def init_db(app):
    """Initializes our database for tests

    Returns:
        Database object
    """
    db.drop_all()
    db.create_all()
    yield db
    db.session.close()
    db.drop_all()
示例#3
0
def init_db(app):
    _db.create_all()
    yield _db
    _db.session.close()
    _db.drop_all()
示例#4
0
def init_db(app):
    db.drop_all()
    db.create_all()
    yield db
    db.session.close()
    db.drop_all()