]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dsdb/tests: let password_lockout.py let _readd_user() return the ldb connection...
authorStefan Metzmacher <metze@samba.org>
Fri, 5 Feb 2016 07:37:53 +0000 (08:37 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 30 Jun 2016 01:30:25 +0000 (03:30 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/tests/python/password_lockout.py

index 396f64e19ab10d11bef55a0d4eb8994356633286..f88a325cec87347de78b756c7c11f1439f3e93a7 100755 (executable)
@@ -384,7 +384,7 @@ userPassword: thatsAcomplPASS1
         # and the workstation.
         creds2 = insta_creds()
 
-        self.ldb2 = SamDB(url=host_url, credentials=creds2, lp=lp)
+        ldb = SamDB(url=host_url, credentials=creds2, lp=lp)
 
         res = self._check_account("cn=testuser,cn=users," + self.base_dn,
                                   badPwdCount=0,
@@ -397,6 +397,7 @@ userPassword: thatsAcomplPASS1
 
         lastLogon = int(res[0]["lastLogon"][0])
         self.assertGreater(lastLogon, badPasswordTime)
+        return ldb
 
     def assertLoginFailure(self, url, creds, lp, errno=ERR_INVALID_CREDENTIALS):
         try:
@@ -495,7 +496,7 @@ 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._readd_user()
+        self.ldb2 = self._readd_user()
 
      # (Re)adds the test user "testuser3" with no password atm
         delete_force(self.ldb, "cn=testuser3,cn=users," + self.base_dn)