'Tests that an attempt to schedule a task after the Dag\'s end_date
does not succeed.'

def test_schedule_dag_start_end_dates(self):

    delta = timedelta(hours=1)
    runs = 3
    start_date = DEFAULT_DATE
    end_date = (start_date + ((runs - 1) * delta))
    dag = DAG((TEST_DAG_ID + 'test_schedule_dag_start_end_dates'), start_date=start_date, end_date=end_date, schedule_interval=delta)
    dag.add_task(models.BaseOperator(task_id='faketastic', owner='Also    fake'))
    dag_runs = []
    scheduler = jobs.SchedulerJob(**self.default_scheduler_args)
    for i in range(runs):
        dag_runs.append(scheduler.create_dag_run(dag))
    additional_dag_run = scheduler.create_dag_run(dag)
    for dag_run in dag_runs:
        self.assertIsNotNone(dag_run)
    self.assertIsNone(additional_dag_run)
