Пример #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()