<commit_before>from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from django.test.client import Client
from .models import Report, DisplayField
from .views import *
from django.conf import settings
from report_utils.model_introspection import get_properties_from_model, get_direct_fields_from_model

try:
    from django.contrib.auth import get_user_model
    User = get_user_model()
except ImportError:
    from django.contrib.auth.models import User

class UtilityFunctionTests(TestCase):
    def setUp(self):
        self.report_ct = ContentType.objects.get_for_model(Report)
        self.report = Report.objects.create(
            name="foo report",
            root_model=self.report_ct)
        self.filter_field = FilterField.objects.create(
            report=self.report,
            field="X",
            field_verbose="stuff",
            filter_type = 'contains',
            filter_value = 'Lots of spam')
<commit_msg>Fixed tests not importing<commit_after>from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from django.test.client import Client
from .models import Report, DisplayField, FilterField
from .views import *
from django.conf import settings
from report_utils.model_introspection import (
    get_properties_from_model, get_direct_fields_from_model,
    get_relation_fields_from_model)

try:
    from django.contrib.auth import get_user_model
    User = get_user_model()
except ImportError:
    from django.contrib.auth.models import User

class UtilityFunctionTests(TestCase):
    def setUp(self):
        self.report_ct = ContentType.objects.get_for_model(Report)
        self.report = Report.objects.create(
            name="foo report",
            root_model=self.report_ct)
        self.filter_field = FilterField.objects.create(
            report=self.report,
            field="X",
            field_verbose="stuff",
            filter_type = 'contains',
            filter_value = 'Lots of spam')

{'fraction_non_alphanumeric': 0.0753221010901883, 'fraction_numerical': 0.0, 'mean_word_length': 3.3796095444685466, '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': '6924449', 'n_tokens_mistral': 552, 'n_tokens_neox': 544, 'n_words': 133}