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



##########
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:
       I think we should do this after the test to clean up properly. Maybe a 
`setup_class` and a `teardown_method` so we ensure a clean slate both before 
and after each test.




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