uranusjr commented on a change in pull request #18421:
URL: https://github.com/apache/airflow/pull/18421#discussion_r713796860



##########
File path: tests/www/views/test_views_dagrun.py
##########
@@ -60,17 +60,12 @@ def init_blank_dagrun():
 
     This really shouldn't be needed, but tests elsewhere leave the db dirty.
     """
-    with create_session() as session:
-        session.query(DagRun).delete()
-        session.query(TaskInstance).delete()
+    clear_db_runs()
 
 
 @pytest.fixture(autouse=True)
 def reset_dagrun():
-    yield
-    with create_session() as session:
-        session.query(DagRun).delete()
-        session.query(TaskInstance).delete()
+    clear_db_runs()

Review comment:
       Oops, thanks for spotting this.




-- 
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]


Reply via email to