<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals

import unittest
import json

from me_api.app import create_app
from me_api.configs import TestingConfig


class MeAPITestCase(unittest.TestCase):
    def setUp(self):
        self.app = create_app(TestingConfig).test_client()

    def test_index(self):
        rv = self.app.get('/')
        assert 'me' in json.loads(rv.data).keys()
        assert 'routers' in json.loads(rv.data).keys()<commit_msg>Update test_modules.py: test the num of routers<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, unicode_literals

import unittest
import json

from me_api.app import create_app
from me_api.configs import TestingConfig


class MeAPITestCase(unittest.TestCase):
    def setUp(self):
        self.app = create_app(TestingConfig).test_client()

    def test_index(self):
        rv = self.app.get('/')
        assert 'me' in json.loads(rv.data).keys()
        assert 'routers' in json.loads(rv.data).keys()
        assert (len(TestingConfig.modules['modules'].keys()) ==
                len(json.loads(rv.data)['routers']))
{'fraction_non_alphanumeric': 0.12762384550797648, 'fraction_numerical': 0.0016792611251049538, 'mean_word_length': 3.549618320610687, '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': '5072243', 'n_tokens_mistral': 386, 'n_tokens_neox': 379, 'n_words': 86}