diff --git a/tests/test_utils/db.py b/tests/test_utils/db.py index 77875bb03ec51..bd56ed9175cc4 100644 --- a/tests/test_utils/db.py +++ b/tests/test_utils/db.py @@ -35,7 +35,6 @@ Variable, XCom, ) -from airflow.models.backfill import Backfill, BackfillDagRun from airflow.models.dag import DagOwnerAttributes from airflow.models.dagcode import DagCode from airflow.models.dagwarning import DagWarning @@ -68,6 +67,8 @@ def clear_db_runs(): def clear_db_backfills(): + from airflow.models.backfill import Backfill, BackfillDagRun + with create_session() as session: session.query(BackfillDagRun).delete() session.query(Backfill).delete()