'Starts a server, and returns a LDAPObject bound to it'

def _init(self, reuse_existing=True, bind=True):

    server = self._init_server(reuse_existing)
    l = _ldap.initialize(server.get_url())
    if bind:
        l.set_option(_ldap.OPT_PROTOCOL_VERSION, _ldap.VERSION3)
        m = l.simple_bind(server.get_root_dn(), server.get_root_password())
        (result, pmsg, msgid, ctrls) = l.result3(m, _ldap.MSG_ONE, self.timeout)
        self.assertTrue(result, _ldap.RES_BIND)
    return l
