mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4/dsdb/tests/python: PY3 Port samba4.ldap.password_lockout
use Exception.args member as exception is no longer supports indexing. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
2b09cfe083
commit
e8413056d3
@ -678,7 +678,7 @@ userPassword: thatsAcomplPASS2XYZ
|
||||
oldpassword="bad-password")
|
||||
self.fail("Invalid SAMR change_password accepted")
|
||||
except NTSTATUSError as e:
|
||||
enum = ctypes.c_uint32(e[0]).value
|
||||
enum = ctypes.c_uint32(e.args[0]).value
|
||||
self.assertEquals(enum, ntstatus.NT_STATUS_WRONG_PASSWORD)
|
||||
|
||||
# check the status of the account is updated after each bad attempt
|
||||
@ -712,7 +712,7 @@ userPassword: thatsAcomplPASS2XYZ
|
||||
oldpassword=password)
|
||||
self.fail("Invalid SAMR change_password accepted")
|
||||
except NTSTATUSError as e:
|
||||
enum = ctypes.c_uint32(e[0]).value
|
||||
enum = ctypes.c_uint32(e.args[0]).value
|
||||
self.assertEquals(enum, ntstatus.NT_STATUS_ACCOUNT_LOCKED_OUT)
|
||||
|
||||
res = self._check_account(userdn,
|
||||
|
Loading…
Reference in New Issue
Block a user