<commit_before>import __builtin__
import maps
from tendrl.commons.utils.event_utils import emit_event

def test_emit_event():
    setattr(__builtin__, "NS", maps.NamedDict())
    NS.publisher_id = 0
    NS.node_context = maps.NamedDict(fqdn="test", node_id="0")
    NS.tendrl_context = maps.NamedDict(integration_id="",
                                       cluster_name="",
                                       sds_name="")
    emit_event("test","test","test","test","test", tags=maps.NamedDict(entity_type="brick"))
    emit_event("test","test","test","test","test", tags=maps.NamedDict(entity_type="volume"))<commit_msg>Update test_event_utils.py<commit_after>import __builtin__
import maps
from tendrl.commons.utils.event_utils import emit_event


def test_emit_event():
    setattr(__builtin__, "NS", maps.NamedDict())
    NS.publisher_id = 0
    NS.node_context = maps.NamedDict(fqdn="test",
                                     node_id="0")
    NS.tendrl_context = maps.NamedDict(integration_id="",
                                       cluster_name="",
                                       sds_name="")
    emit_event("test", "test", "test", "test", "test",
               tags=maps.NamedDict(entity_type="brick"))
    emit_event("test", "test", "test", "test", "test",
               tags=maps.NamedDict(entity_type="volume"))
{'fraction_non_alphanumeric': 0.14392244593586875, 'fraction_numerical': 0.002982848620432513, 'mean_word_length': 2.696969696969697, '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': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5892267', 'n_tokens_mistral': 405, 'n_tokens_neox': 398, 'n_words': 60}