<commit_before># pylint: disable=protected-access,no-member,no-self-use
from unittest import mock

from testfixtures import compare

from tools.bots.cloud.status_manager import StatusManager
from tools.bots.cloud.test_base import TestCloudBase

StatusManager.MANAGE_TABLE = "wiki_bots_manage_table_tst"


class TestStatusManager(TestCloudBase):
    def test_init(self):
        status_manager = StatusManager("TestBot")
        compare(1, status_manager.current_run.id)
        compare({"id": 1,
                 "bot_name": "TestBot",
                 "finish": mock.ANY,
                 "success": mock.ANY,
                 "start_time": mock.ANY,
                 "finish_time": mock.ANY,
                 "output": mock.ANY},
                self.manage_table.get_item(Key={"id": 1})["Item"])


    def test_unique_id(self):
        status_manager = StatusManager("TestBot")
        compare(1, status_manager.current_run.id)
        compare(1, self.manage_table.get_item(Key={"id": 1})["Item"]["id"])
        status_manager_2 = StatusManager("TestBot2")
        compare(2, status_manager_2.current_run.id)
        compare(2, self.manage_table.get_item(Key={"id": 2})["Item"]["id"])

    def test_3(self):
        pass<commit_msg>make branch ready for little merge<commit_after># pylint: disable=protected-access,no-member,no-self-use
from unittest import mock

from testfixtures import compare

from tools.bots.cloud.status_manager import StatusManager
from tools.bots.cloud.test_base import TestCloudBase

StatusManager.MANAGE_TABLE = "wiki_bots_manage_table_tst"


class TestStatusManager(TestCloudBase):
    def test_init(self):
        status_manager = StatusManager("TestBot")
        compare(1, status_manager.current_run.id)
        compare({"id": 1,
                 "bot_name": "TestBot",
                 "finish": mock.ANY,
                 "success": mock.ANY,
                 "start_time": mock.ANY,
                 "finish_time": mock.ANY,
                 "output": mock.ANY},
                self.manage_table.get_item(Key={"id": 1})["Item"])


    def test_unique_id(self):
        status_manager = StatusManager("TestBot")
        compare(1, status_manager.current_run.id)
        compare(1, self.manage_table.get_item(Key={"id": 1})["Item"]["id"])
        # status_manager_2 = StatusManager("TestBot2")
        # compare(2, status_manager_2.current_run.id)
        # compare(2, self.manage_table.get_item(Key={"id": 2})["Item"]["id"])

    def test_3(self):
        pass
{'fraction_non_alphanumeric': 0.12855426511814178, 'fraction_numerical': 0.010412494993992792, 'mean_word_length': 2.9338582677165355, 'pattern_counts': {'":': 20, '<': 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': '6874538', 'n_tokens_mistral': 787, 'n_tokens_neox': 768, 'n_words': 132}