<commit_before>import unittest
import HoneypotBase


class MyTestCase(unittest.TestCase):
    # plugins tests

    # make sure threads are being created for each plugin
    def test_plugins_loaded(self):
        HoneypotBase._load_plugins()
        self.assertIsNotNone(HoneypotBase.threads)
        self.assertNotEqual(len(HoneypotBase.threads), 0)

    # make sure all plugin manager threads are running
    def test_num_threads_started(self):
        HoneypotBase._load_plugins()
        count = 0
        for i in HoneypotBase.threads:
            if i.isAlive:
                count += 1
        self.assertNotEqual(len(HoneypotBase.threads), 0)
        self.assertEqual(len(HoneypotBase.threads), count)
        # listen user commands

    # stop program
    def test_num_threads_running(self):
        HoneypotBase._load_plugins()
        HoneypotBase.signal_handler('^C2', None)
        for i in HoneypotBase.threads:
            self.assertFalse(i.isAlive())
        self.assertNotEqual(len(HoneypotBase.threads), 0)

<commit_msg>Fix errors<commit_after>from unittest import TestCase
import HoneypotBase
import time

class TestHoneypotBase(TestCase):

    def test_1(self):
        HoneypotBase._load_plugins()
        time.sleep(0.01)
        HoneypotBase._signal_handler('15', None)
        #HoneypotBase._signal_handler('^C2', None)
        #'15' - kill, '^C2' - ctrl c

{'fraction_non_alphanumeric': 0.08900144717800289, 'fraction_numerical': 0.011577424023154847, 'mean_word_length': 2.9514285714285715, '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': '1749444', 'n_tokens_mistral': 451, 'n_tokens_neox': 400, 'n_words': 89}