<commit_before>from django.core.management import call_command
from django.test import SimpleTestCase

from corehq.apps.es.tests.utils import es_test
from corehq.elastic import get_es_new
from corehq.pillows.mappings.sms_mapping import SMS_INDEX_INFO  # any valid index will do
from pillowtop.es_utils import initialize_index_and_mapping


@es_test(index=SMS_INDEX_INFO, setup_class=True)
class TestUpdateEsMapping(SimpleTestCase):
    """Guard against management command argument changes breaking the
    `update_es_mapping` migration utility in the future."""

    @classmethod
    def setUpClass(cls):
        super().setUpClass()
        cls.index = SMS_INDEX_INFO.index
        cls.es = get_es_new()
        cls.drop_index()
        initialize_index_and_mapping(cls.es, SMS_INDEX_INFO)<commit_msg>Docstring reword (bump GitHub actions)<commit_after>from django.core.management import call_command
from django.test import SimpleTestCase

from corehq.apps.es.tests.utils import es_test
from corehq.elastic import get_es_new
from corehq.pillows.mappings.sms_mapping import SMS_INDEX_INFO  # any valid index will do
from pillowtop.es_utils import initialize_index_and_mapping


@es_test(index=SMS_INDEX_INFO, setup_class=True)
class TestUpdateEsMapping(SimpleTestCase):
    """Guard against future changes to the `update_es_mapping` management
    command accidentally breaking this migration utility."""

    @classmethod
    def setUpClass(cls):
        super().setUpClass()
        cls.index = SMS_INDEX_INFO.index
        cls.es = get_es_new()
        cls.drop_index()
        initialize_index_and_mapping(cls.es, SMS_INDEX_INFO)
{'fraction_non_alphanumeric': 0.07099143206854346, 'fraction_numerical': 0.0, 'mean_word_length': 4.7368421052631575, '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': '4031629', 'n_tokens_mistral': 495, 'n_tokens_neox': 479, 'n_words': 119}