mirror of
https://github.com/kakwa/ldapcherry
synced 2025-07-04 20:37:48 +02:00
adding unit test for ppolicy
This commit is contained in:
parent
cd13bf5d22
commit
4a55d040f9
2 changed files with 17 additions and 0 deletions
|
@ -87,6 +87,13 @@ class TestError(object):
|
|||
app._set_access_log(cfg, logging.DEBUG)
|
||||
app._set_error_log(cfg, logging.DEBUG)
|
||||
|
||||
def testPPolicy(self):
|
||||
app = LdapCherry()
|
||||
loadconf('./tests/cfg/ldapcherry.ini', app)
|
||||
wrong = app._checkppolicy('password')['match']
|
||||
good = app._checkppolicy('Passw0rd.')['match']
|
||||
assert wrong == False and good == True
|
||||
|
||||
def testMissingBackend(self):
|
||||
app = LdapCherry()
|
||||
loadconf('./tests/cfg/ldapcherry.ini', app)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue