<commit_before>// Copyright 2013 gandalf authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package testing

import (
	"launchpad.net/gocheck"
	"net/http"
	"testing"
)

func Test(t *testing.T) { gocheck.TestingT(t) }

type S struct{}

var _ = gocheck.Suite(&S{})

func (s *S) TestGandalfServerShouldRespondeToCalls(c *gocheck.C) {
	h := TestHandler{}
	ts := TestServer(&h)
	_, err := http.Get(ts.URL + "/test-server")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h.Url, gocheck.Equals, "/test-server")
}<commit_msg>testing/server_test: closing test server at end of function<commit_after>// Copyright 2013 gandalf authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package testing

import (
	"launchpad.net/gocheck"
	"net/http"
	"testing"
)

func Test(t *testing.T) { gocheck.TestingT(t) }

type S struct{}

var _ = gocheck.Suite(&S{})

func (s *S) TestGandalfServerShouldRespondeToCalls(c *gocheck.C) {
	h := TestHandler{}
	ts := TestServer(&h)
	defer ts.Close()
	_, err := http.Get(ts.URL + "/test-server")
	c.Assert(err, gocheck.IsNil)
	c.Assert(h.Url, gocheck.Equals, "/test-server")
}
{'fraction_non_alphanumeric': 0.14456869009584664, 'fraction_numerical': 0.006389776357827476, 'mean_word_length': 4.156378600823046, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5734771', 'n_tokens_mistral': 476, 'n_tokens_neox': 460, 'n_words': 127}