Skip to content

Commit

Permalink
add unit test for get_user
Browse files Browse the repository at this point in the history
  • Loading branch information
kakwa committed May 28, 2015
1 parent 0f97d1d commit 1acd48c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_BackendLdap.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ def testDelUserDontExists(self):
else:
raise AssertionError("expected an exception")

def testGetUser(self):
inv = Backend(cfg, cherrypy.log, 'ldap', attr)
ret = inv.get_user('jwatson')
expected = {'sn': 'watson', 'uid': 'jwatson', 'cn': 'John Watson'}
assert ret == expected

def testAddUserMissingMustAttribute(self):
inv = Backend(cfg, cherrypy.log, 'ldap', attr)
Expand Down

0 comments on commit 1acd48c

Please sign in to comment.