python:tests: Replace deprecated method assertRaisesRegexp()
authorJo Sutton <josutton@catalyst.net.nz>
Tue, 9 Apr 2024 03:31:15 +0000 (15:31 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 16 Apr 2024 03:58:31 +0000 (03:58 +0000)
Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/blackbox/gmsa.py

index eefa3799f6d41795fd156689324fa99ee6acd927..6d0411c0d195212a718e3111f8b4e0abd38bdf39 100644 (file)
@@ -192,7 +192,7 @@ class GMSABlackboxTest(BlackboxTestCase):
         self.check_run(f'samba-tool service-account modify --name={gmsa_account} --group-msa-membership="{sddl}" -H {HOST} {ADMIN_CREDS}')
 
         # Group MSA membership can no longer be represented as a simple list.
-        with self.assertRaisesRegexp(BlackboxProcessError, "Cannot be represented as a simple list"):
+        with self.assertRaisesRegex(BlackboxProcessError, "Cannot be represented as a simple list"):
             self.check_run(f"samba-tool service-account group-msa-membership show --name={gmsa_account} -H {HOST} {ADMIN_CREDS}")
 
         # Retrieving the SDDL still works fine.