<commit_before>"""
Tests utility scripts
"""

from django.test import TestCase, RequestFactory
from django.test.utils import override_settings
import pivot
from pivot.utils import *


TEST_CSV_PATH = os.path.join(os.path.dirname(pivot.__file__),
                             'test',
                             'test_resources',
                             'csvfiles/',)


class UtilsTest(TestCase):
    @override_settings(CSV_ROOT=TEST_CSV_PATH)<commit_msg>Remove wildcard import<commit_after>"""
Tests utility scripts
"""
import os

from django.test import TestCase, RequestFactory
from django.test.utils import override_settings

import pivot
from pivot.utils import get_latest_term


TEST_CSV_PATH = os.path.join(os.path.dirname(pivot.__file__),
                             'test',
                             'test_resources',
                             'csvfiles/',)


class UtilsTest(TestCase):
    @override_settings(CSV_ROOT=TEST_CSV_PATH)
{'fraction_non_alphanumeric': 0.08909853249475891, 'fraction_numerical': 0.0, 'mean_word_length': 2.4854014598540144, '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': '3361372', 'n_tokens_mistral': 272, 'n_tokens_neox': 262, 'n_words': 56}