python: Correct Python2 super() calls that called the wrong class
authorAndrew Bartlett <abartlet@samba.org>
Thu, 30 Nov 2023 00:22:18 +0000 (13:22 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Nov 2023 01:05:32 +0000 (01:05 +0000)
These changes have been checked as safe as skipping a superclass
has no actual impact.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/blackbox/mdsearch.py
python/samba/tests/cred_opt.py
python/samba/tests/dcerpc/mdssvc.py
python/samba/tests/dcerpc/raw_testcase.py

index 1f72c4e39487726e68032ca761adafcb9e0ae339..8d67090e18212fb056fbf8bcca1a5c18abbed628 100644 (file)
@@ -83,7 +83,7 @@ class MdfindBlackboxTests(BlackboxTestCase):
             f.close()
 
     def tearDown(self):
-        super(BlackboxTestCase, self).tearDown()
+        super().tearDown()
         for file in testfiles:
             os.remove("%s/%s" % (self.sharepath, file))
 
index 5bc7a831da778441bbf1d2929c54a61ad5a0812b..0e28b67d19656f99a86a1261dc9270ced88b9ad9 100644 (file)
@@ -66,7 +66,7 @@ class CredentialsOptionsTests(samba.tests.TestCase):
         self.assertIn(clear_password_opt, setproctitle.getproctitle())
 
     def tearDown(self):
-        super(samba.tests.TestCase, self).tearDown()
+        super().tearDown()
         setproctitle.setproctitle(self.old_proctitle)
         sys.argv.pop()
 
index 31c3ba9ae521162e53de6c6b0a26cc286bb64d80..1d53676dea3415895c9298fa0f485325c5622572 100644 (file)
@@ -96,7 +96,7 @@ class MdssvcTests(RpcInterfaceTestCase):
             f.close()
 
     def tearDown(self):
-        super(RpcInterfaceTestCase, self).tearDown()
+        super().tearDown()
         for file in testfiles:
             os.remove("%s/%s" % (self.sharepath, file))
 
index 81ca9b1c6cef3cc6d6f20ef0c982b55811a91216..743fa0f38c1f5e3b0f8ff2e7c1ca6e0adf3e056a 100644 (file)
@@ -170,7 +170,7 @@ class RawDCERPCTest(TestCase):
 
     def tearDown(self):
         self._disconnect("tearDown")
-        super(TestCase, self).tearDown()
+        super().tearDown()
 
     def noop(self):
         return