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



##########
File path: tests/models/test_dagbag.py
##########
@@ -44,19 +44,20 @@
 from tests.test_utils import db
 from tests.test_utils.asserts import assert_queries_count
 from tests.test_utils.config import conf_vars
-from tests.test_utils.permissions import delete_dag_specific_permissions
 
 
 class TestDagBag:
     @classmethod
     def setup_class(cls):
         cls.empty_dir = mkdtemp()
+        db.clear_dag_specific_permissions()
 
     @classmethod
     def teardown_class(cls):
         shutil.rmtree(cls.empty_dir)
+        db.clear_dag_specific_permissions()
 
-    def setup_methods(self) -> None:
+    def setup_method(self) -> None:
         db.clear_db_dags()
         db.clear_db_runs()
         db.clear_db_serialized_dags()

Review comment:
       I actually meant this entire function can be merged into `setup_class`. 
Sorry for not being clear. The current change is OK if we’re to minimise the 
changed lines, although I’d still prefer we changing this to make the test 
suite ever so slightly faster.




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