<commit_before>package controller

import (
	"testing"
	"github.com/stretchr/testify/assert"
	"bk-api/test"
	"github.com/mageddo/go-logging"
	"bk-api/entity"
	"bk-api/service"
	"regexp"
	"bk-api/utils"
	"time"
)

var regex = regexp.MustCompile("[\t\n]+")

func TestGetV1_0Success(t *testing.T){

	now, err := time.Parse("2016-01-02", "2017-08-07")
	if err != nil {
		t.Fatal(err)
	}
	utils.SetNow(now)

	ctx := logging.NewContext()
	test.BuildDatabase()

	expectedXML := regex.ReplaceAllString(`<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><commit_msg>MG-402 fixing test<commit_after>package controller

import (
	"testing"
	"github.com/stretchr/testify/assert"
	"bk-api/test"
	"github.com/mageddo/go-logging"
	"bk-api/entity"
	"bk-api/service"
	"regexp"
	"bk-api/utils"
	"time"
)

var regex = regexp.MustCompile("[\t\n]+")

func TestGetV1_0Success(t *testing.T){

	now, err := time.Parse("2006-01-02", "2017-08-07")
	if err != nil {
		t.Fatal(err)
	}
	utils.SetNow(now)

	ctx := logging.NewContext()
	test.BuildDatabase()

	expectedXML := regex.ReplaceAllString(`<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{'fraction_non_alphanumeric': 0.19638455217748563, 'fraction_numerical': 0.04026294165981923, 'mean_word_length': 4.536363636363636, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 2, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '6938897', 'n_tokens_mistral': 550, 'n_tokens_neox': 503, 'n_words': 73}