diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-03-04 23:35:26 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-03-16 14:27:11 +0000 |
commit | 845d3674286b410070d215a73f75af4e758935af (patch) | |
tree | e9cfb7d3f6d15a1782a0ce0ebf6ad045f30a5c7c | |
parent | 6e43d4ca919698c2153262294961fef944312dd8 (diff) | |
download | samba-845d3674286b410070d215a73f75af4e758935af.tar.gz |
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 03ba5af3d9eaeb5f0c7c1a1a61ef2ac454eb8392)
-rw-r--r-- | source4/dsdb/tests/python/password_lockout_base.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/dsdb/tests/python/password_lockout_base.py b/source4/dsdb/tests/python/password_lockout_base.py index 0f9617da1e6..913e8304a8a 100644 --- a/source4/dsdb/tests/python/password_lockout_base.py +++ b/source4/dsdb/tests/python/password_lockout_base.py @@ -248,12 +248,7 @@ userPassword: """ + userpass + """ self._check_account_initial(userdn) # Fail once to get a badPasswordTime - try: - 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) + self.assertLoginFailure(self.host_url, fail_creds, self.lp) # Succeed to reset everything to 0 ldb = SamDB(url=self.host_url, credentials=creds, lp=self.lp) |