1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 01:14:21 +01:00

add unit test for get_user

This commit is contained in:
kakwa 2015-05-28 09:56:25 +02:00
parent 0f97d1d07c
commit 1acd48c332

View File

@ -178,6 +178,11 @@ class TestError(object):
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)