diff options
| author | Stefan Metzmacher <metze@samba.org> | 2016-02-05 08:37:53 +0100 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2016-06-30 03:30:25 +0200 |
| commit | 025e573d84cc0ac69defad06c045c81fed5ab1e6 (patch) | |
| tree | 695eac959f3779a96a91209170e3cf68e68a5f59 /source4/dsdb/tests/python | |
| parent | 26a96d296420246f428584681485bb07de094063 (diff) | |
| download | samba-025e573d84cc0ac69defad06c045c81fed5ab1e6.tar.gz samba-025e573d84cc0ac69defad06c045c81fed5ab1e6.tar.bz2 samba-025e573d84cc0ac69defad06c045c81fed5ab1e6.zip | |
s4:dsdb/tests: let password_lockout.py let _readd_user() return the ldb connection as user
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/tests/python')
| -rwxr-xr-x | source4/dsdb/tests/python/password_lockout.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/dsdb/tests/python/password_lockout.py b/source4/dsdb/tests/python/password_lockout.py index 396f64e19ab..f88a325cec8 100755 --- a/source4/dsdb/tests/python/password_lockout.py +++ b/source4/dsdb/tests/python/password_lockout.py @@ -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) |
