コード例 #1
0
def drop_db():
    """
    Remove all entries in the database
    :param db_uri: URI to the database
    :return: None
    """
    db.drop_all()
コード例 #2
0
ファイル: __init__.py プロジェクト: ciscomonkey/Mycodo
def drop_db():
    """
    Remove all entries in the database
    :param db_uri: URI to the database
    :return: None
    """
    db.drop_all()
コード例 #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()
コード例 #4
0
ファイル: conftest.py プロジェクト: ciscomonkey/Mycodo
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()
コード例 #5
0
ファイル: __init__.py プロジェクト: rosaLux161/Mycodo
def drop_db():
    """Remove all entries in the database."""
    db.drop_all()