### Body

Currently `start_date` is mandatory parameter.
For DAGs with `schedule=None` we can relax this requirement as no scheduling calculation needed so the `start_date` parameter isn't used.

### Committer

- [X] I acknowledge that I am a maintainer/committer of the Apache Airflow project.
return "output of first task"
        @task_decorator
        def check_task_2(my_input):
            
            mock_object(my_input)
        with dag:
            check_task_2(check_task())
        dag.test()
        mock_object.assert_called_with("output of first task")
    def test_dag_test_with_fail_handler(self):
        mock_handle_object_1 = mock.MagicMock()
        mock_handle_object_2 = mock.MagicMock()
        def handle_task_failure(context):
            ti = context["task_instance"]
            mock_handle_object_1(f"task {ti.task_id} failed...")
        def handle_dag_failure(context):
            ti = context["task_instance"]
            mock_handle_object_2(f"dag {ti.dag_id} run failed...")
        dag = DAG(
            dag_id="test_local_testing_conn_file",
            default_args={"on_failure_callback": handle_task_failure},
            on_failure_callback=handle_dag_failure,
            start_date=DEFAULT_DATE,
        )
        mock_task_object_1 = mock.MagicMock()
        mock_task_object_2 = mock.MagicMock()
        @task_decorator
        def check_task():