1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-12-23 05:10:03 +01:00

implement unit test on auth test

This commit is contained in:
kakwa 2015-05-22 01:33:15 +02:00
parent 95232ba432
commit 31afad5ee9

View File

@ -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 = {}