mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
python: tests: make HRES_SEC_E_* constant an int
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
6bcfcacd53
commit
1a45e49b5f
@ -267,11 +267,11 @@ unicodePwd:: """ + base64.b64encode("\"thatsAcomplPASS2\"".encode('utf-16-le')).
|
|||||||
SamDB(url=host_ldaps,
|
SamDB(url=host_ldaps,
|
||||||
credentials=self.creds, lp=lp)
|
credentials=self.creds, lp=lp)
|
||||||
except LdbError as err:
|
except LdbError as err:
|
||||||
HRES_SEC_E_INVALID_TOKEN = '80090308'
|
HRES_SEC_E_INVALID_TOKEN = 0x80090308
|
||||||
|
|
||||||
num, estr = err.args
|
num, estr = err.args
|
||||||
self.assertEqual(ERR_INVALID_CREDENTIALS, num)
|
self.assertEqual(ERR_INVALID_CREDENTIALS, num)
|
||||||
self.assertIn(HRES_SEC_E_INVALID_TOKEN, estr)
|
self.assertIn(f"{HRES_SEC_E_INVALID_TOKEN:08X}", estr)
|
||||||
else:
|
else:
|
||||||
self.fail('should have failed to login with previous password!')
|
self.fail('should have failed to login with previous password!')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user