You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/08/09 13:30:25 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #17506: Use `dag_maker` fixture in test_processor.py

ephraimbuddy commented on a change in pull request #17506:
URL: https://github.com/apache/airflow/pull/17506#discussion_r685194037



##########
File path: tests/conftest.py
##########
@@ -473,7 +473,11 @@ def __call__(self, dag_id='test_dag', session=None, **kwargs):
             self.kwargs = kwargs
             self.session = session
             self.start_date = self.kwargs.get('start_date', None)
+            default_args = kwargs.get('default_args', None)
+            if not self.start_date and 'start_date' in default_args:
+                self.start_date = default_args.get('start_date')

Review comment:
       The default_args here is the one used by DAG to pass to tasks. It can be in the kwargs as `default_args`.
   See: https://github.com/apache/airflow/blob/37cc115d30dc17cf474a6eff04aad056cb6adef4/airflow/models/dag.py#L165
   




-- 
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-unsubscribe@airflow.apache.org

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