Esempio n. 1
0
def drop_db():
    """
    Remove all entries in the database
    :param db_uri: URI to the database
    :return: None
    """
    db.drop_all()
Esempio n. 2
0
def drop_db():
    """
    Remove all entries in the database
    :param db_uri: URI to the database
    :return: None
    """
    db.drop_all()
Esempio n. 3
0
def db(app):
    """ Creates a config object to setup and databases during tests """
    _db.app = app
    with app.app_context():
        _db.create_all()

    yield _db
    _db.drop_all()
Esempio n. 4
0
def db(app):
    """ Creates a config object to setup and databases during tests """
    _db.app = app
    with app.app_context():
        _db.create_all()

    yield _db
    _db.drop_all()
Esempio n. 5
0
def drop_db():
    """Remove all entries in the database."""
    db.drop_all()