From 860c6b1e8f53ccb64038d89297b08db824420ec4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 5 Feb 2016 08:37:53 +0100 Subject: [PATCH] s4:dsdb/tests: let password_lockout.py pass creds as argument to _readd_user() Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- source4/dsdb/tests/python/password_lockout.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py index 6d19d5a7bf2..6941f828562 100755 --- a/source4/dsdb/tests/python/password_lockout.py +++ b/source4/dsdb/tests/python/password_lockout.py @@ -277,8 +277,7 @@ userAccountControl: %d time.sleep(0.01) return res - def _readd_user(self): - creds = insta_creds() + def _readd_user(self, creds): username = creds.get_username() userpass = creds.get_password() userdn = "cn=%s,cn=users,%s" % (username, self.base_dn) @@ -500,7 +499,8 @@ lockoutThreshold: """ + str(lockoutThreshold) + """ self.samr_handle = self.samr.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED) self.samr_domain = self.samr.OpenDomain(self.samr_handle, security.SEC_FLAG_MAXIMUM_ALLOWED, self.domain_sid) - self.ldb2 = self._readd_user() + self.creds2 = insta_creds() + self.ldb2 = self._readd_user(self.creds2) # (Re)adds the test user "testuser3" with no password atm delete_force(self.ldb, "cn=testuser3,cn=users," + self.base_dn)