Esempio n. 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()
Esempio n. 2
0
def clean_db_and_bootstrap():
    clean_db()
    bootstrap()
    db.session.commit()
Esempio n. 3
0
def setup():
    # Add sample data to the database
    bootstrap()
Esempio n. 4
0
def bootstraped_db(db):
    """Provides clean db, bootstrapped with some initial data  (see
    `tests.bootstrap()`)
    """
    bootstrap()
    yield model.db.session
Esempio n. 5
0
def setup():
    # Add sample data to the database
    bootstrap()