'Test if the scheduler does not create multiple dagruns
if a dag is scheduled with @once and a start_date'

def test_scheduler_dagrun_once(self):

    dag = DAG(u'test_scheduler_dagrun_once', start_date=datetime.datetime(2015, 1, 1), schedule_interval=u'@once')
    scheduler = SchedulerJob()
    dag.clear()
    dr = scheduler.create_dag_run(dag)
    self.assertIsNotNone(dr)
    dr = scheduler.create_dag_run(dag)
    self.assertIsNone(dr)
