<commit_before>from datetime import date

from django.contrib.contenttypes.models import ContentType
from django.test import TestCase

from dcim.models import Site

from extras.models import (
    CustomField, CustomFieldValue, CustomFieldChoice, CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE,
    CF_TYPE_SELECT,
)


class RackTestCase(TestCase):

    def setUp(self):

        Site.objects.bulk_create([
            Site(name='Site A', slug='site-a'),
            Site(name='Site B', slug='site-b'),
            Site(name='Site C', slug='site-c'),
        ])

    def test_simple_fields(self):

        DATA = (
            {'field_type': CF_TYPE_TEXT, 'field_value': 'Foobar!', 'empty_value': ''},<commit_msg>Fixed test case name<commit_after>from datetime import date

from django.contrib.contenttypes.models import ContentType
from django.test import TestCase

from dcim.models import Site

from extras.models import (
    CustomField, CustomFieldValue, CustomFieldChoice, CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE,
    CF_TYPE_SELECT,
)


class CustomFieldTestCase(TestCase):

    def setUp(self):

        Site.objects.bulk_create([
            Site(name='Site A', slug='site-a'),
            Site(name='Site B', slug='site-b'),
            Site(name='Site C', slug='site-c'),
        ])

    def test_simple_fields(self):

        DATA = (
            {'field_type': CF_TYPE_TEXT, 'field_value': 'Foobar!', 'empty_value': ''},
{'fraction_non_alphanumeric': 0.11989100817438691, 'fraction_numerical': 0.0, 'mean_word_length': 3.4786585365853657, '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': '2876159', 'n_tokens_mistral': 472, 'n_tokens_neox': 451, 'n_words': 101}