def test_search_ex_ldap(self): dns = set( item.distinguishedName.Value \ for item in active_directory.search_ex("<%s>;;distinguishedName;Subtree" % self.ou.ADsPath) ) self.assertEqual(dns, self.dns)
def test_search_ex_sql(self): dns = set( item.distinguishedName.Value \ for item in active_directory.search_ex("SELECT distinguishedName FROM '%s'" % self.ou.ADsPath) ) self.assertEqual(dns, self.dns)