<commit_before>package api_test

import (
	"testing"
	"net/http"
	"net/http/httptest"
)

func TestListPackage(t *testing.T) {
	request, _ := http.NewRequest("GET", "test/package", nil)
	response := httptest.NewRecorder()

	listPackage(response, request)
	if response.Code != http.StatusOK {
		t.Fatalf("Response code expected 200 got %v:\n", response.Code)
	}
}

func TestUploadPackage(t *testing.T) {
	request, _ := http.NewRequest("POST", "test/package", nil)
	response := httptest.NewRecorder()

	uploadPackage(response, request)
	if response.Code != http.StatusOK {
		t.Fatalf("Response code expected 200 got %v:\n", response.Code)
	}
}

func TestDownloadPackage(t *testing.T) {
	request, _ := http.NewRequest("GET", "test/package/pkg.tgz", nil)
	response := httptest.NewRecorder()

	downloadPackage(response, request)
	if response.Code != http.StatusOK {
		t.Fatalf("Response code expected 200 got %v:\n", response.Code)
	}
}
<commit_msg>Renamed func names<commit_after>package api

import (
	"testing"
	"net/http"
	"net/http/httptest"
)

func TestPackageList(t *testing.T) {
	request, _ := http.NewRequest("GET", "test/package", nil)
	response := httptest.NewRecorder()

	packageList(response, request)
	if response.Code != http.StatusOK {
		t.Fatalf("Response code expected %v got %v:\n",
		http.StatusOK, response.Code)
	}
}

func TestPackageUpload(t *testing.T) {
	request, _ := http.NewRequest("POST", "test/package", nil)
	response := httptest.NewRecorder()

	packageUpload(response, request)
	if response.Code != http.StatusCreated {
		t.Fatalf("Response code expected %v got %v:\n",
		http.StatusCreated, response.Code)
	}
}

func TestPackageDownload(t *testing.T) {
	request, _ := http.NewRequest("GET", "test/package/pkg.tgz", nil)
	response := httptest.NewRecorder()

	packageDownload(response, request)
	if response.Code != http.StatusOK {
		t.Fatalf("Response code expected %v got %v:\n",
		http.StatusOK, response.Code)
	}
}

{'fraction_non_alphanumeric': 0.15380658436213993, 'fraction_numerical': 0.004629629629629629, 'mean_word_length': 4.876132930513595, 'pattern_counts': {'":': 0, '<': 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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5857712', 'n_tokens_mistral': 697, 'n_tokens_neox': 675, 'n_words': 143}