hussein-awala commented on code in PR #35356:
URL: https://github.com/apache/airflow/pull/35356#discussion_r1387237858


##########
tests/models/test_dag.py:
##########
@@ -827,6 +827,15 @@ def test_following_schedule_datetime_timezone(self):
         when = dag.following_schedule(start)
         assert when.isoformat() == "2018-03-25T03:00:00+00:00"
 
+    def test_create_dagrun_when_schedule_is_none_and_empty_start_date(self):
+        # Check that we don't get an AttributeError 'start_date' for 
self.start_date when schedule is empty
+        dag = DAG("dag_without_start_date")
+        dag.add_task(BaseOperator(task_id="task_without_start_date"))
+        dagrun = dag.create_dagrun(
+            state=State.RUNNING, run_type=DagRunType.SCHEDULED, 
execution_date=DEFAULT_DATE

Review Comment:
   yes, but we can consider that this condition is always met when the user 
does not provide a start date.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to