예제 #1
0
def test_communities(app, tmp_location):
    """Load test communities."""
    from b2share_demo.helpers import load_demo_data

    with app.app_context():
        tmp_location.default = True
        db.session.merge(tmp_location)
        db.session.commit()
        # load root schemas
        load_root_schemas()
        # load the demo
        load_demo_data(os.path.join(
            os.path.dirname(os.path.realpath(__file__)),
            'data'), verbose=0)
        db.session.commit()
        return {com.name: com.id for com in Community.query.all()}
예제 #2
0
def test_communities(app, tmp_location):
    """Load test communities."""
    from b2share_demo.helpers import load_demo_data

    with app.app_context():
        tmp_location.default = True
        db.session.merge(tmp_location)
        db.session.commit()
        # load root schemas
        load_root_schemas()
        # load the demo
        load_demo_data(os.path.join(
            os.path.dirname(os.path.realpath(__file__)),
            'data'), verbose=0)
        db.session.commit()
        return {com.name: com.id for com in Community.query.all()}
예제 #3
0
def schemas_init(alembic, verbose):
    """Load root schemas."""
    load_root_schemas(cli=True, verbose=verbose)
예제 #4
0
def schemas_init(alembic, verbose):
    """Load root schemas."""
    load_root_schemas(cli=True, verbose=verbose)