Exemple #1
0
def db():
    config = {'SQL_DATABASE_URI': 'sqlite://', 'SQL_ECHO': False}
    _db = SQLClient(config, model_class=Model)
    _db.create_all()

    yield _db

    _db.shutdown()
    _db.drop_all()
def db():
    config = {"SQL_DATABASE_URI": "sqlite://", "SQL_ECHO": False}
    _db = SQLClient(config, model_class=Model)
    _db.create_all()

    yield _db

    _db.disconnect()
    _db.drop_all()
Exemple #3
0
def db():
    config = {
        'SQL_DATABASE_URI': 'sqlite://',
        'SQL_ECHO': False
    }
    _db = SQLClient(config, model_class=Model)
    _db.create_all()

    yield _db

    _db.disconnect()
    _db.drop_all()