<commit_before># -*- coding: utf-8 -*-
import os
import unittest
import intelmq.lib.test as test
import intelmq.lib.utils as utils
from intelmq.tests.bots.outputs.redis.test_output import EXAMPLE_EVENT
import pika
import json

if os.environ.get('INTELMQ_TEST_EXOTIC'):
    from intelmq.bots.outputs.amqptopic.output import AMQPTopicOutputBot


class TestAMQPTopicOutputBot(test.BotTestCase, unittest.TestCase):

    @classmethod
    def set_bot(cls):
        cls.bot_reference = AMQPTopicOutputBot
        cls.default_input_message = EXAMPLE_EVENT
        cls.sysconfig = {"connection_attempts": 3,
                        "connection_heartbeat": 3600,
                        "connection_host": "127.0.0.1",
                        "connection_port": 5672,
                        "connection_vhost": "/",<commit_msg>TST: amqp topic output test: import pika if exotic<commit_after># -*- coding: utf-8 -*-
import json
import os
import unittest

import intelmq.lib.test as test
import intelmq.lib.utils as utils
from intelmq.bots.outputs.amqptopic.output import AMQPTopicOutputBot
from intelmq.tests.bots.outputs.redis.test_output import EXAMPLE_EVENT

if os.environ.get('INTELMQ_TEST_EXOTIC'):
    import pika


class TestAMQPTopicOutputBot(test.BotTestCase, unittest.TestCase):

    @classmethod
    def set_bot(cls):
        cls.bot_reference = AMQPTopicOutputBot
        cls.default_input_message = EXAMPLE_EVENT
        cls.sysconfig = {"connection_attempts": 3,
                        "connection_heartbeat": 3600,
                        "connection_host": "127.0.0.1",
                        "connection_port": 5672,
                        "connection_vhost": "/",
{'fraction_non_alphanumeric': 0.0931899641577061, 'fraction_numerical': 0.019115890083632018, 'mean_word_length': 2.7388392857142856, 'pattern_counts': {'":': 10, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '410038', 'n_tokens_mistral': 535, 'n_tokens_neox': 500, 'n_words': 106}