implement unit test on auth test

This commit is contained in:
kakwa 2015-05-22 01:33:15 +02:00
parent 95232ba432
commit 31afad5ee9
1 changed files with 4 additions and 2 deletions

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