<commit_before><commit_msg>Added first test for config class<commit_after>from unittest import TestCase
import mock
from jav.core.javConfig import Config
from cement.core import foundation

class TestConfig(TestCase):

    @classmethod
    def get_app(self):
        """App init, necessary to get to the logging service"""
        app = foundation.CementApp('myapp')
        app.setup()
        app.run()
        return app

    @classmethod
    def get_config(self):
        config = {
            'end_date': '2017-02-01'
            , 'git_branch': 'gh-pages'
            , 'git_localpath': '/Users/USERNAME/Desktop/test-agile-page/'
            , 'git_pageurl': 'https://org.github.io/repo/dir/'
            , 'git_pathdirectory': 'dir/'
            , 'git_repo': 'https://github.com/org/repo.git'
            , 'jira_field_points': 'customfield_10002'
            , 'jira_host': 'https://URL'
            , 'jira_jql_remaining': 'JQL QUERY'
            , 'jira_jql_velocity': 'JQL QUERY'
            , 'jira_password': 'PASSWORD'
            , 'jira_username': 'USERNAME'
            , 'rolling_stats': [4, 8, 12]
            , 'slack_channel': '#general'
            , 'slack_webhook': 'SLACK WEBHOOK'
            , 'stats_metric': 'tickets'
        }
        return config

    def test_get_config_value(self):
        # App init, necessary to get to the logging service
        app = self.get_app()

        config = Config(app.log)
        config.config = self.get_config()

        self.assertEqual(config.get_config_value('jira_jql_remaining'), 'JQL QUERY')



{'fraction_non_alphanumeric': 0.12603437301082113, 'fraction_numerical': 0.010821133036282623, 'mean_word_length': 2.221311475409836, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '5293247', 'n_tokens_mistral': 508, 'n_tokens_neox': 482, 'n_words': 102}