<commit_before>from __future__ import absolute_import

from unittest import TestCase
import re

from pyramid.config import Configurator
from testfixtures import log_capture

from .. import config, request_log


class TestConfig(TestCase):

    def tearDown(self):
        request_log.unlog_pattern = None
        request_log.authenticated_id = ''

    @log_capture()
    def test_no_conf(self, log):
        config.includeme(Configurator())
        log.check(
            (
                'pyramid_request_log.config',
                'WARNING',
                'No pyramid_request_log.pattern found in settings',
            ),
        )
        self.assertIsNone(request_log.unlog_pattern)<commit_msg>Unused import re<commit_after>from __future__ import absolute_import

from unittest import TestCase

from pyramid.config import Configurator
from testfixtures import log_capture

from .. import config, request_log


class TestConfig(TestCase):

    def tearDown(self):
        request_log.unlog_pattern = None
        request_log.authenticated_id = ''

    @log_capture()
    def test_no_conf(self, log):
        config.includeme(Configurator())
        log.check(
            (
                'pyramid_request_log.config',
                'WARNING',
                'No pyramid_request_log.pattern found in settings',
            ),
        )
        self.assertIsNone(request_log.unlog_pattern)
{'fraction_non_alphanumeric': 0.07423269093504639, 'fraction_numerical': 0.0, 'mean_word_length': 2.5137844611528823, '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': '1998022', 'n_tokens_mistral': 409, 'n_tokens_neox': 385, 'n_words': 85}