From 3aa6473b7df02bd98efc30d4b1df02e57ee9c8ae Mon Sep 17 00:00:00 2001 From: "kuldeep.k@cisinlabs.com" Date: Thu, 16 Dec 2021 12:09:45 +0530 Subject: [PATCH] Updated --- src/tests/mock/bitmessagemock.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/tests/mock/bitmessagemock.py b/src/tests/mock/bitmessagemock.py index 24491a5a..47069d0e 100644 --- a/src/tests/mock/bitmessagemock.py +++ b/src/tests/mock/bitmessagemock.py @@ -4,8 +4,9 @@ from class_objectProcessor import MockObjectProcessor from inventory import MockInventory -def main(): +class MockMain(): """Mock main function""" + def start(self): """Start main application""" # pylint: disable=too-many-statements,too-many-branches,too-many-locals @@ -14,7 +15,7 @@ def main(): daemon = config.safeGetBoolean('bitmessagesettings', 'daemon') # Start the address generation thread - addressGeneratorThread = addressGenerator() + addressGeneratorThread = FakeAddressGenerator() # close the main program even if there are threads left addressGeneratorThread.daemon = True addressGeneratorThread.start() @@ -34,3 +35,13 @@ def main(): objectProcessorThread.start() MockInventory() # init + + +def main(): + """Triggers main module""" + mainprogram = MockMain() + mainprogram.start() + + +if __name__ == "__main__": + main()