<commit_before>#:coding=utf8:

from django.test import TestCase as DjangoTestCase

from commons.shortcuts import *

from commons.tests.shortcuts.shortcuts_app.models import ShortcutModel

class GetObjectOrNoneTestCase(DjangoTestCase):

    def test_simple(self):
        obj = get_object_or_None(ShortcutModel, pk=1)
        self.assertTrue(obj is not None)

    def test_queryset(self):
        qs = ShortcutModel.objects.filter(name="queryset")
        obj = get_object_or_None(qs, pk=2)
        self.assertTrue(obj is not None)

    def test_none(self):
        obj = get_object_or_None(ShortcutModel, pk=5)
        self.assertTrue(obj is None)
<commit_msg>make_simple_response テストを追加<commit_after>#:coding=utf8:

from django.test import TestCase as DjangoTestCase

from commons.shortcuts import *

from commons.tests.shortcuts.shortcuts_app.models import ShortcutModel

class GetObjectOrNoneTestCase(DjangoTestCase):

    def test_simple(self):
        obj = get_object_or_None(ShortcutModel, pk=1)
        self.assertTrue(obj is not None)

    def test_queryset(self):
        qs = ShortcutModel.objects.filter(name="queryset")
        obj = get_object_or_None(qs, pk=2)
        self.assertTrue(obj is not None)

    def test_none(self):
        obj = get_object_or_None(ShortcutModel, pk=5)
        self.assertTrue(obj is None)

class MakeSimpleResponseTestCase(DjangoTestCase):

    def test_simple(self):
        response = make_simple_response()
        self.assertEqual(response.content, u'{"msg": "\\u51e6\\u7406\\u304c\\u6210\\u529f\\u3057\\u307e\\u3057\\u305f"}')

{'fraction_non_alphanumeric': 0.09955611921369689, 'fraction_numerical': 0.024730500951173115, 'mean_word_length': 3.8703703703703702, 'pattern_counts': {'":': 1, '<': 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': '802420', 'n_tokens_mistral': 554, 'n_tokens_neox': 520, 'n_words': 98}