Ejemplo n.º 1
0
def db():
    _db.create_all()

    yield _db

    _db.session.remove()
    _db.drop_all()
Ejemplo n.º 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()
Ejemplo n.º 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()