<commit_before>from django.test import TestCase
from django.conf import settings
from phonenumber_field.modelfields import PhoneNumberField

from whats_fresh.models import *
from django.contrib.gis.db import models

import os
import time
import sys
import datetime


class PreparationsTestCase(TestCase):
    def setUp(self):
        self.expected_fields = {
            'name': models.TextField,
            'description': models.TextField,
            'additional_info': models.TextField,
            u'id': models.AutoField
        }

    def test_fields_exist(self):
        model = models.get_model('whats_fresh', 'Preparation')
        for field, field_type in self.expected_fields.items():
            self.assertEqual(
                field_type, type(model._meta.get_field_by_name(field)[0]))

    def test_no_additional_fields(self):
        fields = Vendor._meta.get_all_field_names()
        self.assertTrue(sorted(fields) == sorted(self.expected_fields.keys()))
<commit_msg>Change unicode test string to ascii<commit_after>from django.test import TestCase
from django.conf import settings
from phonenumber_field.modelfields import PhoneNumberField

from whats_fresh.models import *
from django.contrib.gis.db import models

import os
import time
import sys
import datetime


class PreparationsTestCase(TestCase):
    def setUp(self):
        self.expected_fields = {
            'name': models.TextField,
            'description': models.TextField,
            'additional_info': models.TextField,
            'id': models.AutoField
        }

    def test_fields_exist(self):
        model = models.get_model('whats_fresh', 'Preparation')
        for field, field_type in self.expected_fields.items():
            self.assertEqual(
                field_type, type(model._meta.get_field_by_name(field)[0]))

    def test_no_additional_fields(self):
        fields = Vendor._meta.get_all_field_names()
        self.assertTrue(sorted(fields) == sorted(self.expected_fields.keys()))

{'fraction_non_alphanumeric': 0.0912280701754386, 'fraction_numerical': 0.0010025062656641604, 'mean_word_length': 3.264957264957265, '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': '6436648', 'n_tokens_mistral': 572, 'n_tokens_neox': 553, 'n_words': 123}