'Tests that backfill tasks won\'t get executed.'

def test_execute_task_instances_backfill_tasks_wont_execute(self):

    dag_id = u'SchedulerJobTest.test_execute_task_instances_backfill_tasks_wont_execute'
    task_id_1 = u'dummy_task'
    dag = DAG(dag_id=dag_id, start_date=DEFAULT_DATE)
    task1 = DummyOperator(dag=dag, task_id=task_id_1)
    dagbag = SimpleDagBag([dag])
    scheduler = SchedulerJob(**self.default_scheduler_args)
    session = settings.Session()
    dr1 = scheduler.create_dag_run(dag)
    dr1.run_id = (BackfillJob.ID_PREFIX + u'_blah')
    ti1 = TI(task1, dr1.execution_date)
    ti1.refresh_from_db()
    ti1.state = State.SCHEDULED
    session.merge(ti1)
    session.merge(dr1)
    session.commit()
    self.assertTrue(dr1.is_backfill)
    scheduler._execute_task_instances(dagbag, [State.SCHEDULED])
    ti1.refresh_from_db()
    self.assertEquals(State.SCHEDULED, ti1.state)
