def test_selectDN(self): """ Select licence by LDAP DN. """ ret = ul.selectDN('cn=admin,cn=license,cn=univention,%s') self.assertEqual(ret, 0) ul.free()
def test_select(self): """ Select licence by LDAP search `(univentionLicenseModule=admin)` """ ret = ul.select('admin') self.assertEqual(ret, 0) ul.free() ul.free()
def test_getValues(self): """ Return value from globally selected licence. """ ret = ul.select('admin') self.assertEqual(ret, 0) val = ul.getValue('univentionLicenseBaseDN') self.assertIsNotNone(val) ul.free()
def test_check(self): """ Just check licence by LDAP DN. Returns bit-field: 0b0001: Invalid signature 0b0010: Invalid end date 0b0100: Invalid base DN 0b1000: Invalid search path """ ret = ul.check('cn=admin,cn=license,cn=univention,%s') self.assertEqual(ret, 0) ul.free()
def test_double_free(self): ul.free() ul.free()