<commit_before>import unittest, os
from pymongo import MongoClient

URL = 'mongodb://niprov-admin:{0}@ds<EMAIL>.mongolab.com:41571/niprov'
PASSWORD = '<PASSWORD>'


class MongoTests(unittest.TestCase):

    def setUp(self):
        from niprov import Context
        self.provenance = Context()
        self.fullURL = URL.format(PASSWORD)
        self.provenance.config.database_type = 'MongoDB'
        self.provenance.config.database_url = self.fullURL

    def tearDown(self):
        client = MongoClient(self.fullURL)
        client.get_default_database().provenance.drop()

    def test_Something(self):
        self.provenance.discover('testdata')
        testfpath = os.path.abspath('testdata/parrec/T1.PAR')
        img = self.provenance.get(forFile=testfpath)
        self.assertEqual(img.provenance['subject'], '05aug14test')

    def test_Stats(self):
        self.provenance.discover('testdata')
        repository = self.provenance.deps.getRepository()
        print(repository.statistics())


<commit_msg>Disabled mongodb tests on Travis.<commit_after>import unittest, os
from pymongo import MongoClient

URL = 'mongodb://niprov-admin:{0}@<EMAIL>.<EMAIL>:41571/niprov'
PASSWORD = '<PASSWORD>'


class MongoTests(unittest.TestCase):

    def setUp(self):
        from niprov import Context
        self.provenance = Context()
        self.fullURL = URL.format(PASSWORD)
        self.provenance.config.database_type = 'MongoDB'
        self.provenance.config.database_url = self.fullURL

    def tearDown(self):
        client = MongoClient(self.fullURL)
        client.get_default_database().provenance.drop()

    @unittest.skipIf("TRAVIS" in os.environ, "Skipping this test on Travis CI.")
    def test_Something(self):
        self.provenance.discover('testdata')
        testfpath = os.path.abspath('testdata/parrec/T1.PAR')
        img = self.provenance.get(forFile=testfpath)
        self.assertEqual(img.provenance['subject'], '05aug14test')

    @unittest.skipIf("TRAVIS" in os.environ, "Skipping this test on Travis CI.")
    def test_Stats(self):
        self.provenance.discover('testdata')
        repository = self.provenance.deps.getRepository()
        print(repository.statistics())



{'fraction_non_alphanumeric': 0.12189616252821671, 'fraction_numerical': 0.009932279909706547, 'mean_word_length': 3.4231536926147705, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2468097', 'n_tokens_mistral': 743, 'n_tokens_neox': 705, 'n_words': 116}