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")
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