mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 09:24:21 +01:00
adding unit test for _parse_params
This commit is contained in:
parent
287ef63215
commit
b8f37aa545
@ -174,6 +174,14 @@ class TestError(object):
|
|||||||
app._adduser(form)
|
app._adduser(form)
|
||||||
app._deleteuser('test')
|
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):
|
def testModifUser(self):
|
||||||
app = LdapCherry()
|
app = LdapCherry()
|
||||||
loadconf('./tests/cfg/ldapcherry_test.ini', app)
|
loadconf('./tests/cfg/ldapcherry_test.ini', app)
|
||||||
|
Loading…
Reference in New Issue
Block a user