示例#1
0
def frontend(frontend_app):
    """Clean database before each frontend test

    This fixture uses frontend_app, suitable for functional tests.
    """
    with frontend_app.app_context():
        clean_db()
        bootstrap()
        yield frontend_app
        model.db.session.rollback()
示例#2
0
def clean_db_and_bootstrap():
    clean_db()
    bootstrap()
    db.session.commit()
示例#3
0
def setup():
    # Add sample data to the database
    bootstrap()
示例#4
0
def bootstraped_db(db):
    """Provides clean db, bootstrapped with some initial data  (see
    `tests.bootstrap()`)
    """
    bootstrap()
    yield model.db.session
示例#5
0
def setup():
    # Add sample data to the database
    bootstrap()