dimberman commented on issue #13805:
URL: https://github.com/apache/airflow/issues/13805#issuecomment-776322924
Thank you @MaxTaggart.
Here is a test that should work for the BackFillJob
```
def test_backfill_has_job_id(self):
dag = self.dagbag.get_dag("test_start_date_scheduling")
dag.clear()
executor = MockExecutor(parallelism=16)
job = BackfillJob(
executor=executor,
dag=dag,
start_date=DEFAULT_DATE,
end_date=DEFAULT_DATE + datetime.timedelta(days=1),
run_backwards=True,
)
job.run()
assert executor.job_id != None
```
and here is one that should work for test_views.py
```
@mock.patch('airflow.executors.executor_loader.ExecutorLoader.get_default_executor')
def test_run_executor_has_job_id(self, get_default_executor_function):
executor = CeleryExecutor()
executor.heartbeat = lambda: True
get_default_executor_function.return_value = executor
task_id = 'runme_0'
form = dict(
task_id=task_id,
dag_id="example_bash_operator",
ignore_all_deps="false",
ignore_ti_state="false",
execution_date=self.EXAMPLE_DAG_DEFAULT_DATE,
origin='/home',
)
resp = self.client.post('run', data=form, follow_redirects=True)
assert executor.job_id !=None
```
Please let me know if those work as expected.
@ClassyLion Sorry this one didn't work out but now that you're set up if you
wanna pick any of the "first issue" tagged issues for the project I'm still
glad to help you get a commit in :)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]