You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/17 05:08:15 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #20881: Fix a test case inside tests/models that leaves a trace in the DB

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



##########
File path: tests/models/test_dagbag.py
##########
@@ -56,15 +55,17 @@ def setup_class(cls):
     def teardown_class(cls):
         shutil.rmtree(cls.empty_dir)
 
-    def setup_methods(self) -> None:
+    def setup_method(self) -> None:
         db.clear_db_dags()
         db.clear_db_runs()
         db.clear_db_serialized_dags()
+        db.clear_dag_specific_permissions()

Review comment:
       Clearing things before every test is too exccessive. It’s probably better to change this to `setup_class` instead.




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org