mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 09:24:21 +01:00
add unit test for get_user
This commit is contained in:
parent
0f97d1d07c
commit
1acd48c332
@ -178,6 +178,11 @@ class TestError(object):
|
|||||||
else:
|
else:
|
||||||
raise AssertionError("expected an exception")
|
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):
|
def testAddUserMissingMustAttribute(self):
|
||||||
inv = Backend(cfg, cherrypy.log, 'ldap', attr)
|
inv = Backend(cfg, cherrypy.log, 'ldap', attr)
|
||||||
|
Loading…
Reference in New Issue
Block a user