dag = DAG(
            "dag",
            start_date=DEFAULT_DATE,
            default_view="graph",
        )
        with dag:
            EmptyOperator(task_id="task", owner="owner1")
            SubDagOperator(
                task_id="subtask",
                owner="owner2",
                subdag=DAG(
                    "dag.subtask",
                    start_date=DEFAULT_DATE,
                ),
            )
        session = settings.Session()
        dag.sync_to_db(session=session)
        orm_dag = session.query(DagModel).filter(DagModel.dag_id == "dag").one()
        assert orm_dag.default_view is not None
        assert orm_dag.default_view == "graph"
        session.close()
    @provide_session
    def test_is_paused_subdag(self, session):