Skip to content

Commit

Permalink
implement unit test on auth test
Browse files Browse the repository at this point in the history
  • Loading branch information
kakwa committed May 21, 2015
1 parent 95232ba commit 31afad5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_BackendLdap.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ def testAuthSuccess(self):

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

0 comments on commit 31afad5

Please sign in to comment.