'Test that CLI respects -I argument'

def test_cli_backfill_depends_on_past(self):

    dag_id = u'test_dagrun_states_deadlock'
    run_date = (DEFAULT_DATE + datetime.timedelta(days=1))
    args = [u'backfill', dag_id, u'-l', u'-s', run_date.isoformat()]
    dag = self.dagbag.get_dag(dag_id)
    dag.clear()
    self.assertRaisesRegexp(AirflowException, u'BackfillJob    is    deadlocked', cli.backfill, self.parser.parse_args(args))
    cli.backfill(self.parser.parse_args((args + [u'-I'])))
    ti = TI(dag.get_task(u'test_depends_on_past'), run_date)
    ti.refresh_from_db()
    self.assertEqual(ti.state, State.SUCCESS)
    dag.clear()
