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