<commit_before>from django.test import TestCase
from yunity.groups.factories import Group
from yunity.stores.factories import Store, PickupDate
from yunity.stores.serializers import StoreSummarySerializer


class TestStoreSummarySerializer(TestCase):

    @classmethod
    def setUpClass(cls):
        super(TestStoreSummarySerializer, cls).setUpClass()
        cls.group = Group()
        cls.store = Store()

    def test_store_instantiation(self):
        serializer = StoreSummarySerializer(self.store)
        self.assertEqual(serializer.data['name'], self.store.name)
        self.assertEqual(len(serializer.data['pickups']), 0)

    def test_storesummary_pickups(self):
        PickupDate(store=self.store)
        serializer = StoreSummarySerializer(self.store)
        self.assertEqual(len(serializer.data['pickups']), 1)<commit_msg>Added timezone-aware date to avoid warning<commit_after>from django.test import TestCase
from yunity.groups.factories import Group
from yunity.stores.factories import Store, PickupDate
from yunity.stores.serializers import StoreSummarySerializer
from django.utils import timezone


class TestStoreSummarySerializer(TestCase):

    @classmethod
    def setUpClass(cls):
        super(TestStoreSummarySerializer, cls).setUpClass()
        cls.group = Group()
        cls.store = Store()

    def test_store_instantiation(self):
        serializer = StoreSummarySerializer(self.store)
        self.assertEqual(serializer.data['name'], self.store.name)
        self.assertEqual(len(serializer.data['pickups']), 0)

    def test_storesummary_pickups(self):
        PickupDate(store=self.store, date=timezone.now())
        serializer = StoreSummarySerializer(self.store)
        self.assertEqual(len(serializer.data['pickups']), 1)
{'fraction_non_alphanumeric': 0.09785067873303167, 'fraction_numerical': 0.0022624434389140274, 'mean_word_length': 4.296407185628743, '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': '7135606', 'n_tokens_mistral': 504, 'n_tokens_neox': 490, 'n_words': 95}