Пример #1
0
def db():
    _db.create_all()

    yield _db

    _db.session.remove()
    _db.drop_all()
Пример #2
0
def db():
    """
    Database fixture which creates/drop tables on setup/cleanup

    Useful for tests that need an empty database (e.g. testing mongo imports)
    """
    _db.create_all()

    yield _db

    _db.session.remove()
    _db.drop_all()
Пример #3
0
def db():
    """
    Database fixture which creates/drop tables on setup/cleanup

    Useful for tests that need an empty database (e.g. testing mongo imports)
    """
    _db.create_all()

    yield _db

    _db.session.remove()
    _db.drop_all()