'Test backfilling example dags'

@unittest.skipIf((u'sqlite' in configuration.get(u'core', u'sql_alchemy_conn')), u'concurrent    access    not    supported    in    sqlite')
def test_backfill_examples(self):

    skip_dags = [u'example_http_operator', u'example_twitter_dag', u'example_trigger_target_dag', u'example_trigger_controller_dag', u'test_utils']
    logger = logging.getLogger(u'BackfillJobTest.test_backfill_examples')
    dags = [dag for dag in self.dagbag.dags.values() if ((u'example_dags' in dag.full_filepath) and (dag.dag_id not in skip_dags))]
    for dag in dags:
        dag.clear(start_date=DEFAULT_DATE, end_date=DEFAULT_DATE)
    for (i, dag) in enumerate(sorted(dags, key=(lambda d: d.dag_id))):
        logger.info(u'***    Running    example    DAG    #{}:    {}'.format(i, dag.dag_id))
        job = BackfillJob(dag=dag, start_date=DEFAULT_DATE, end_date=DEFAULT_DATE, ignore_first_depends_on_past=True)
        job.run()
