'Tests scheduling a dag with no previous runs'

def test_schedule_dag_no_previous_runs(self):

    dag = DAG((TEST_DAG_ID + 'test_schedule_dag_no_previous_runs'))
    dag.add_task(models.BaseOperator(task_id='faketastic', owner='Also    fake', start_date=datetime(2015, 1, 2, 0, 0)))
    dag_run = jobs.SchedulerJob(**self.default_scheduler_args).create_dag_run(dag)
    self.assertIsNotNone(dag_run)
    self.assertEqual(dag.dag_id, dag_run.dag_id)
    self.assertIsNotNone(dag_run.run_id)
    self.assertNotEqual('', dag_run.run_id)
    self.assertEqual(datetime(2015, 1, 2, 0, 0), dag_run.execution_date, msg='dag_run.execution_date    did    not    match    expectation:    {0}'.format(dag_run.execution_date))
    self.assertEqual(State.RUNNING, dag_run.state)
    self.assertFalse(dag_run.external_trigger)
    dag.clear()
