<commit_before>package insights_client

import (
	"net/http"
	"testing"

	"github.com/algolia/algoliasearch-client-go/algolia/debug"
	"github.com/algolia/algoliasearch-client-go/algolia/insights"
	"github.com/algolia/algoliasearch-client-go/algolia/opt"
	"github.com/algolia/algoliasearch-client-go/cts"
	"github.com/stretchr/testify/require"
)

func TestSendingEvents(t *testing.T) {
	t.Parallel()
	_, index, indexName := cts.InitSearchClient1AndIndex(t)

	{
		res, err := index.SaveObjects([]map[string]string{
			{"objectID": "one"},
			{"objectID": "two"},
		})
		require.NoError(t, err)
		require.NoError(t, res.Wait())
	}

	debug.Enable()

	insightsClient := cts.InitInsightsClient(t)<commit_msg>changed: remove useless debug.Enable() call in Insights integration test "Sending Events"<commit_after>package insights_client

import (
	"net/http"
	"testing"

	"github.com/algolia/algoliasearch-client-go/algolia/insights"
	"github.com/algolia/algoliasearch-client-go/algolia/opt"
	"github.com/algolia/algoliasearch-client-go/cts"
	"github.com/stretchr/testify/require"
)

func TestSendingEvents(t *testing.T) {
	t.Parallel()
	_, index, indexName := cts.InitSearchClient1AndIndex(t)

	{
		res, err := index.SaveObjects([]map[string]string{
			{"objectID": "one"},
			{"objectID": "two"},
		})
		require.NoError(t, err)
		require.NoError(t, res.Wait())
	}

	insightsClient := cts.InitInsightsClient(t)
{'fraction_non_alphanumeric': 0.15965787598004277, 'fraction_numerical': 0.0014255167498218105, 'mean_word_length': 5.185022026431718, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5000403', 'n_tokens_mistral': 554, 'n_tokens_neox': 533, 'n_words': 69}