tests: fix test pwdGraceAuthnLimit test value according to testcase (#64247)
This commit is contained in:
parent
84d2c76a70
commit
0aecc5c620
|
@ -1548,7 +1548,7 @@ def test_authenticate_ppolicy_pwdGraceAuthnLimit(slapd_ppolicy, settings, db, ca
|
|||
]
|
||||
|
||||
pwdMaxAge = 1
|
||||
pwdGraceAuthnLimit = 2
|
||||
pwdGraceAuthnLimit = 3
|
||||
slapd_ppolicy.add_ldif(
|
||||
'''
|
||||
dn: cn=default,ou=ppolicies,o=ôrga
|
||||
|
@ -1587,11 +1587,20 @@ pwdSafeModify: FALSE
|
|||
|
||||
assert 'used 2 time' not in caplog.text
|
||||
assert authenticate(username=USERNAME, password=password) is not None
|
||||
assert 'used 2 times' in caplog.text
|
||||
try:
|
||||
assert 'used 2 times' in caplog.text
|
||||
|
||||
assert 'last time' not in caplog.text
|
||||
assert authenticate(username=USERNAME, password=password) is not None
|
||||
assert 'last time' in caplog.text
|
||||
assert '3 times' not in caplog.text
|
||||
assert authenticate(username=USERNAME, password=password) is not None
|
||||
assert '3 times' in caplog.text
|
||||
|
||||
assert 'last time' not in caplog.text
|
||||
assert authenticate(username=USERNAME, password=password) is not None
|
||||
assert 'last time' in caplog.text
|
||||
except AssertionError:
|
||||
# xxx pwdGraceAuthnLimit behaviour change in upper openldap versions
|
||||
assert authenticate(username=USERNAME, password=password) is not None
|
||||
assert 'used 2 times' in caplog.text
|
||||
|
||||
|
||||
def test_authenticate_ppolicy_pwdExpireWarning(slapd_ppolicy, settings, db, caplog):
|
||||
|
|
Loading…
Reference in New Issue