'Subdag names must be {parent_dag}.{subdag task}'

def test_subdag_name(self):

    dag = DAG('parent', default_args=default_args)
    subdag_good = DAG('parent.test', default_args=default_args)
    subdag_bad1 = DAG('parent.bad', default_args=default_args)
    subdag_bad2 = DAG('bad.test', default_args=default_args)
    subdag_bad3 = DAG('bad.bad', default_args=default_args)
    SubDagOperator(task_id='test', dag=dag, subdag=subdag_good)
    self.assertRaises(AirflowException, SubDagOperator, task_id='test', dag=dag, subdag=subdag_bad1)
    self.assertRaises(AirflowException, SubDagOperator, task_id='test', dag=dag, subdag=subdag_bad2)
    self.assertRaises(AirflowException, SubDagOperator, task_id='test', dag=dag, subdag=subdag_bad3)
