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

adding unit test for _parse_params

This commit is contained in:
kakwa 2015-07-05 22:35:45 +02:00
parent 287ef63215
commit b8f37aa545

View File

@ -174,6 +174,14 @@ class TestError(object):
app._adduser(form)
app._deleteuser('test')
def testParse(self):
app = LdapCherry()
form = {'attr.val': 'val', 'role.id': 'id', 'group.ldap.id': 'id'}
ret = app._parse_params(form)
expected = {'attrs': {'val': 'val'}, 'roles': {'id': 'id'}, 'groups': {'ldap': ['id']}}
assert expected == ret
def testModifUser(self):
app = LdapCherry()
loadconf('./tests/cfg/ldapcherry_test.ini', app)