def METHOD_NAME(self):
    self.reset_ldap_directory()
    user = core_factories.UserFactory(
        username=self.username,
        first_name="Test",
        last_name="LDAP",
        groups=("SimpleUsers",)
    )
    self.assertTrue(lib.check_if_dn_exists(self.conn, self.dn))
    lib.get_connection(self.config, self.dn, "toto")
    user.last_name = "LDAP Modif"
    user.save()
    lib.get_connection(self.config, self.dn, "toto")
    res = self.conn.search_s(
        force_str(self.dn), ldap.SCOPE_SUBTREE,
        force_str("(&(objectClass=inetOrgPerson))")
    )
    self.assertIn(force_bytes(user.last_name), res[0][1]["sn"])