fix(ci): fix task instance constructor in airflow tests (#3366)

This commit is contained in:
Swaroop Jagadish 2021-10-11 20:58:37 -07:00 committed by GitHub
parent 2580f71474
commit 7dab06519d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,11 @@ def test_lineage_backend(mock_emit, inlets, outlets):
)
op1 >> op2
ti = TI(task=op2, execution_date=DEFAULT_DATE)
if airflow.version.version.startswith("1"):
ti = TI(task=op2, execution_date=DEFAULT_DATE)
else:
ti = TI(task=op2)
ctx1 = {
"dag": dag,
"task": op2,