<commit_before>"""
This file is part of the telex project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.

Created on Sep 26, 2014.
"""
import os
import re

from pkg_resources import resource_filename # pylint: disable=E0611
from pyramid.renderers import render_to_response
import pytest

from everest.resources.utils import get_root_collection
from telex.constants import VALUE_TYPES
from telex.interfaces import IShellCommandDefinition
import xml.etree.ElementTree as et


__docformat__ = 'reStructuredText en'
__all__ = ['TestRenderer',
           ]


@pytest.mark.usefixtures('resource_repo')
class TestRenderer(object):
    package_name = 'telex_rgg.tests'
    config_file_name = resource_filename('telex.tests', 'configure.zcml')

    def test_rgg_default(self):
        coll = get_root_collection(IShellCommandDefinition)
        rsp = render_to_response('rgg', dict(context=coll))
        assert rsp.body.find('New telex Command Definition') != -1<commit_msg>Unit test fix.<commit_after>"""
This file is part of the telex project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.

Created on Sep 26, 2014.
"""
import os
import re

from pkg_resources import resource_filename # pylint: disable=E0611
from pyramid.renderers import render_to_response
import pytest

from everest.resources.utils import get_root_collection
from telex.constants import VALUE_TYPES
from telex.interfaces import IShellCommandDefinition
import xml.etree.ElementTree as et


__docformat__ = 'reStructuredText en'
__all__ = ['TestRenderer',
           ]


@pytest.mark.usefixtures('resource_repo')
class TestRenderer(object):
    package_name = 'telex_rgg.tests'
    config_file_name = resource_filename('telex.tests', 'configure.zcml')

    def test_rgg_default(self):
        coll = get_root_collection(IShellCommandDefinition)
        rsp = render_to_response('rgg', dict(context=coll))
        assert rsp.body.find('New telex Shell Command Definition') != -1
{'fraction_non_alphanumeric': 0.08345827086456771, 'fraction_numerical': 0.010994502748625687, 'mean_word_length': 5.012012012012012, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '7037099', 'n_tokens_mistral': 622, 'n_tokens_neox': 593, 'n_words': 162}