<commit_before>from unittest import TestCase

import responses

from ndoh_hub.utils import get_messageset_short_name, get_messageset_schedule_sequence
from ndoh_hub.utils_tests import mock_get_messageset_by_shortname, mock_get_schedule


class GetMessagesetShortnameTests(TestCase):
    def test_postbirth_batch_number(self):
        """
        The batch number should correctly correspond with the age of the baby
        """
        self.assertEqual(
            get_messageset_short_name("momconnect_postbirth", "hw_full", 0),
            "momconnect_postbirth.hw_full.1",
        )
        self.assertEqual(
            get_messageset_short_name("momconnect_postbirth", "hw_full", 14),
            "momconnect_postbirth.hw_full.1",
        )
        self.assertEqual(
            get_messageset_short_name("momconnect_postbirth", "hw_full", 15),
            "momconnect_postbirth.hw_full.2",
        )

    def test_whatsapp_postbirth_batch_number(self):
        """
        The batch number should correctly correspond with the age of the baby
        """
        self.assertEqual(<commit_msg>Automatic formatting changes<commit_after>from unittest import TestCase

import responses

from ndoh_hub.utils import get_messageset_schedule_sequence, get_messageset_short_name
from ndoh_hub.utils_tests import mock_get_messageset_by_shortname, mock_get_schedule


class GetMessagesetShortnameTests(TestCase):
    def test_postbirth_batch_number(self):
        """
        The batch number should correctly correspond with the age of the baby
        """
        self.assertEqual(
            get_messageset_short_name("momconnect_postbirth", "hw_full", 0),
            "momconnect_postbirth.hw_full.1",
        )
        self.assertEqual(
            get_messageset_short_name("momconnect_postbirth", "hw_full", 14),
            "momconnect_postbirth.hw_full.1",
        )
        self.assertEqual(
            get_messageset_short_name("momconnect_postbirth", "hw_full", 15),
            "momconnect_postbirth.hw_full.2",
        )

    def test_whatsapp_postbirth_batch_number(self):
        """
        The batch number should correctly correspond with the age of the baby
        """
        self.assertEqual(
{'fraction_non_alphanumeric': 0.07320379575237235, 'fraction_numerical': 0.0072300045187528245, 'mean_word_length': 3.0924214417744915, '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': '5411500', 'n_tokens_mistral': 661, 'n_tokens_neox': 616, 'n_words': 125}