uranusjr commented on a change in pull request #17506:
URL: https://github.com/apache/airflow/pull/17506#discussion_r685153836
##########
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:
Would it work if we do this?
```python
def __call__(self, dag_id='test_dag', default_args=None, session=None,
**kwargs):
if default_args is not None:
kwargs = {**default_args, **kwargs}
self.kwargs = kwargs
self.session = session
self.start_date = self.kwargs.get('start_date', None)
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]