mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:dsdb:tests: Use loadTestsFromTestCase() instead of makeSuite()
makeSuite() is deprecated and will be removed in Python 3.13. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
bb77f36f49
commit
9e3a858969
@ -515,7 +515,8 @@ if "://" not in host:
|
|||||||
|
|
||||||
if ANCIENT_SAMBA:
|
if ANCIENT_SAMBA:
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
if not runner.run(unittest.makeSuite(UserTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserTests)).wasSuccessful():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
|
@ -80,7 +80,8 @@ if "://" not in host:
|
|||||||
|
|
||||||
if ANCIENT_SAMBA:
|
if ANCIENT_SAMBA:
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
if not runner.run(unittest.makeSuite(UserTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserTests)).wasSuccessful():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
|
@ -332,7 +332,8 @@ if "://" not in host:
|
|||||||
|
|
||||||
if ANCIENT_SAMBA:
|
if ANCIENT_SAMBA:
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
if not runner.run(unittest.makeSuite(UserTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserTests)).wasSuccessful():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
|
@ -123,7 +123,8 @@ if "://" not in host:
|
|||||||
|
|
||||||
if ANCIENT_SAMBA:
|
if ANCIENT_SAMBA:
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
if not runner.run(unittest.makeSuite(UserTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserTests)).wasSuccessful():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
|
@ -288,7 +288,8 @@ if "://" not in host:
|
|||||||
|
|
||||||
if ANCIENT_SAMBA:
|
if ANCIENT_SAMBA:
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
if not runner.run(unittest.makeSuite(UserTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserTests)).wasSuccessful():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
|
@ -214,7 +214,8 @@ if "://" not in host:
|
|||||||
|
|
||||||
if ANCIENT_SAMBA:
|
if ANCIENT_SAMBA:
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
if not runner.run(unittest.makeSuite(UserTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserTests)).wasSuccessful():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
|
@ -386,6 +386,7 @@ class PrivAttrsTests(samba.tests.TestCase):
|
|||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
if not runner.run(unittest.makeSuite(PrivAttrsTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
PrivAttrsTests)).wasSuccessful():
|
||||||
rc = 1
|
rc = 1
|
||||||
sys.exit(rc)
|
sys.exit(rc)
|
||||||
|
@ -1292,6 +1292,7 @@ class UserAccountControlTests(samba.tests.TestCase):
|
|||||||
|
|
||||||
runner = SubunitTestRunner()
|
runner = SubunitTestRunner()
|
||||||
rc = 0
|
rc = 0
|
||||||
if not runner.run(unittest.makeSuite(UserAccountControlTests)).wasSuccessful():
|
if not runner.run(unittest.TestLoader().loadTestsFromTestCase(
|
||||||
|
UserAccountControlTests)).wasSuccessful():
|
||||||
rc = 1
|
rc = 1
|
||||||
sys.exit(rc)
|
sys.exit(rc)
|
||||||
|
Loading…
Reference in New Issue
Block a user