1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

dsdb/tests: make use of assertLoginFailure helper

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13879

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 03ba5af3d9)
This commit is contained in:
Stefan Metzmacher 2022-03-04 23:35:26 +01:00 committed by Jule Anger
parent ff7ffbdf61
commit c35de738da

View File

@ -247,12 +247,7 @@ userPassword: """ + userpass + """
self._check_account_initial(userdn) self._check_account_initial(userdn)
# Fail once to get a badPasswordTime # Fail once to get a badPasswordTime
try: self.assertLoginFailure(self.host_url, fail_creds, self.lp)
ldb = SamDB(url=self.host_url, credentials=fail_creds, lp=self.lp)
self.fail()
except LdbError as e:
(num, msg) = e.args
self.assertEqual(num, ERR_INVALID_CREDENTIALS)
# Succeed to reset everything to 0 # Succeed to reset everything to 0
ldb = SamDB(url=self.host_url, credentials=creds, lp=self.lp) ldb = SamDB(url=self.host_url, credentials=creds, lp=self.lp)