title: DagNotFound Error when Testing DAG in Airflow CLI
body: <p>I’m getting the error: <code>airflow.exceptions.DagNotFound: Dag id test_task not found in DagModel</code> when trying to run a dag via <code>airflow trigger_dag test_dag</code>.</p>
  
  <p>DAG is listed correctly when running <code>airflow list_dags</code>.  I have also checked to make sure the $AIRFLOW_HOME directory is correctly set to where the dag is.  Only way I can get it to work is by running a specific task such as <code>airflow test test_dag test_task</code>. Running <code>python dags/test_dag.py</code> shows no errors.</p>
  
  <p>Code in the dag file itself, after imports:</p>
  
  <pre><code>default_args = {
      'owner': 'airflow',
      'depends_on_past': False,
      'start_date': datetime(2015, 6, 1),
      'email': ['my@email.com'],
      'email_on_failure': False,
      'email_on_retry': False,
      'retries': 1,
      'retry_delay': timedelta(minutes=5),
  }
  
  dag = DAG(
    dag_id='test_dag'
    default_args=default_args, 
    schedule_interval=timedelta(days=1)
  )
  
  </code></pre>