<commit_before>package db

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

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

type S struct{}

var _ = Suite(&S{})

func (s *S) TestShouldProvideMethodToOpenAConnection(c *C) {
	storage, _ := Open("127.0.0.1:27017")
	c.Assert(storage.session.Ping(), IsNil)
	storage.Close()
}
<commit_msg>db: delete database on teardown<commit_after>package db

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

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

type S struct{}

var _ = Suite(&S{})

func (s *S) TearDownSuite(c *C) {
	storage, _ := Open("127.0.0.1:27017")
	storage.session.DB("tsuru").DropDatabase()
	storage.Close()
}

func (s *S) TestShouldProvideMethodToOpenAConnection(c *C) {
	storage, _ := Open("127.0.0.1:27017")
	c.Assert(storage.session.Ping(), IsNil)
	storage.Close()
}

{'fraction_non_alphanumeric': 0.18249075215782984, 'fraction_numerical': 0.040690505548705305, 'mean_word_length': 4.75886524822695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, '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': '3664286', 'n_tokens_mistral': 354, 'n_tokens_neox': 332, 'n_words': 61}