dstandish commented on a change in pull request #21983:
URL: https://github.com/apache/airflow/pull/21983#discussion_r819299829



##########
File path: tests/cli/commands/test_connection_command.py
##########
@@ -34,13 +32,11 @@
 from tests.test_utils.db import clear_db_connections
 
 
-class TestCliGetConnection(unittest.TestCase):
-    def setUp(self):
-        self.parser = cli_parser.get_parser()
-        clear_db_connections()
+class TestCliGetConnection:
+    parser = cli_parser.get_parser()
 
-    def tearDown(self):
-        clear_db_connections()
+    def setup_method(self):
+        clear_db_connections(add_default_connections_back=True)

Review comment:
       yeah i was thinking about that
   
   maybe an autouse fixture in the module that clears after yield
   
   they could all use same fixture except that only some of the classes require 
the example connectios




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