tests/auth_log: Rename ‘self’ parameter to ‘cls’
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 23 May 2023 04:45:28 +0000 (16:45 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 29 May 2023 22:32:28 +0000 (22:32 +0000)
This method operates on the class, not on an instance of that class.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/auth_log_base.py

index 4a4aa81db8a290467889b265ff31ec0ed10f892c..2a65bc0006d19d565842a940fe2e3d545f68de01 100644 (file)
@@ -72,11 +72,11 @@ class AuthLogTestBase(samba.tests.TestCase):
         cls.connection = None
 
     @classmethod
-    def tearDownClass(self):
-        if self.msg_handler_and_context:
-            self.msg_ctx.deregister(self.msg_handler_and_context,
-                                    msg_type=MSG_AUTH_LOG)
-            self.msg_ctx.irpc_remove_name(AUTH_EVENT_NAME)
+    def tearDownClass(cls):
+        if cls.msg_handler_and_context:
+            cls.msg_ctx.deregister(cls.msg_handler_and_context,
+                                   msg_type=MSG_AUTH_LOG)
+            cls.msg_ctx.irpc_remove_name(AUTH_EVENT_NAME)
 
     def setUp(self):
         super(AuthLogTestBase, self).setUp()