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



##########
File path: tests/www/test_security.py
##########
@@ -99,14 +99,33 @@ def setUp(self):
         log.debug("Complete setup!")
 
     @classmethod
-    def delete_roles(cls):
+    def tearDownClass(cls):
+        cls.delete_test_roles()
+        cls.delete_test_users()
+
+    @classmethod
+    def delete_test_users(cls):
+        method_users = [attr[5:] for attr in cls.__dict__ if attr[:4] == 
'test']
+        adhoc_users = [
+            'ElUser',
+            'Monsieur User',
+            'dag_access_user',
+            'LaUser',
+            'dag_permission_user'
+        ]

Review comment:
       I was thinking about the same thing, this should use pytest fixtures to 
put creation and deletion in one place instead of listing the usernames twice. 
I'm probably missing some context why this PR is needed if you intend to 
convert the tests anyway and will leave this for others to comment on.




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