Example #1
0
 def testWrongGetBackendAttributes(self):
     inv = Attributes('./tests/cfg/attributes.yml')
     try:
         ret = inv.get_backend_attributes('notabackend')
     except WrongBackend:
         return
     else:
         raise AssertionError("expected an exception")
Example #2
0
 def testGetBackendAttributes(self):
     inv = Attributes('./tests/cfg/attributes.yml')
     ret = inv.get_backend_attributes('ldap')
     expected = ['shell', 'cn', 'userPassword', 'uidNumber', 'gidNumber', 'sn', 'home', 'givenName', 'email', 'uid']
     assert ret == expected