]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python: tests: claims blackbox tests use ntstatus constants
authorRob van der Linde <rob@catalyst.net.nz>
Tue, 28 Nov 2023 22:37:42 +0000 (11:37 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 29 Nov 2023 03:11:34 +0000 (03:11 +0000)
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/blackbox/claims.py

index 996d1d94e616b91b642f710bde719c45c058d577..ac8fac79418e1a5f6352b90a724e2cced8948d05 100755 (executable)
@@ -27,6 +27,7 @@ from samba import NTSTATUSError
 from samba.auth import AuthContext
 from samba.credentials import Credentials
 from samba.gensec import FEATURE_SEAL, Security
+from samba.ntstatus import NT_STATUS_LOGON_FAILURE, NT_STATUS_UNSUCCESSFUL
 from samba.tests import BlackboxTestCase
 
 SERVER = os.environ["SERVER"]
@@ -90,7 +91,7 @@ class ClaimsSupportTests(BlackboxTestCase):
                 device_password=device_password,
             )
 
-            self.assertEqual(error.exception.args[0], 3221225581)
+            self.assertEqual(error.exception.args[0], NT_STATUS_LOGON_FAILURE)
             self.assertEqual(
                 error.exception.args[1],
                 "The attempted logon is invalid. This is either due to a "
@@ -186,7 +187,7 @@ class ClaimsSupportTests(BlackboxTestCase):
                 device_password=device_password,
             )
 
-        self.assertEqual(error.exception.args[0], 3221225473)
+        self.assertEqual(error.exception.args[0], NT_STATUS_UNSUCCESSFUL)
         self.assertIn(
             "The requested operation was unsuccessful.",
             error.exception.args[1])