def test_ok_not_rootdc(self):
"""Test if it's ok to do dirsync on another NC that is not the root DC"""
- try:
- res = self.ldb_admin.search(self.ldb_admin.get_config_basedn(),
- expression="samaccountname=*",
- controls=["dirsync:1:0:1"])
- except:
- self.assertTrue(False)
+ self.ldb_admin.search(self.ldb_admin.get_config_basedn(),
+ expression="samaccountname=*",
+ controls=["dirsync:1:0:1"])
def test_dirsync_errors(self):
"""Test if dirsync returns the correct LDAP errors in case of pb"""
controls=["paged_results:1:10"])
self.assertEquals(len(res.controls), 1)
self.assertEquals(res.controls[0].oid, "1.2.840.113556.1.4.319")
- try:
- s = str(res.controls[0])
- except:
- self.assertFalse(True)
+ s = str(res.controls[0])
def test_operational(self):
"""Tests operational attributes"""