<commit_before>from app.models import Post
from app.utils.helpers import get_or_create
from tests.general import AppTestCase


class TestUtils(AppTestCase):
    def test_get_or_create(self):
        post1, created1 = get_or_create(Post, title='foo', body='bar')
        post1.save()
        post2, created2 = get_or_create(Post, title='foo', body='bar')
        self.assertTrue(created1)
        self.assertFalse(created2)
        self.assertEquals(post1, post2)<commit_msg>Rename TestUtils test case to TestHelpers<commit_after>from app.models import Post
from app.utils.helpers import get_or_create
from tests.general import AppTestCase


class TestHelpers(AppTestCase):
    def test_get_or_create(self):
        post1, created1 = get_or_create(Post, title='foo', body='bar')
        post1.save()
        post2, created2 = get_or_create(Post, title='foo', body='bar')
        self.assertTrue(created1)
        self.assertFalse(created2)
        self.assertEquals(post1, post2)
{'fraction_non_alphanumeric': 0.10224948875255624, 'fraction_numerical': 0.018404907975460124, 'mean_word_length': 4.046391752577319, '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': '6246189', 'n_tokens_mistral': 297, 'n_tokens_neox': 299, 'n_words': 66}