mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 09:24:21 +01:00
implement unit test on auth test
This commit is contained in:
parent
95232ba432
commit
31afad5ee9
@ -75,11 +75,13 @@ class TestError(object):
|
||||
|
||||
def testAuthSuccess(self):
|
||||
inv = Backend(cfg, cherrypy.log, 'ldap')
|
||||
return True
|
||||
ret = inv.auth('jwatson', 'passwordwatson')
|
||||
assert ret == True
|
||||
|
||||
def testAuthFailure(self):
|
||||
inv = Backend(cfg, cherrypy.log, 'ldap')
|
||||
return True
|
||||
res = inv.auth('notauser', 'password') or inv.auth('jwatson', 'notapassword')
|
||||
assert res == False
|
||||
|
||||
def testMissingParam(self):
|
||||
cfg2 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user