WIP: Added mock code #1883

Draft
kdcis wants to merge 10 commits from kdcis/mock-test into v0.6
Showing only changes of commit a9fb41821a - Show all commits

View File

@ -1,3 +1,6 @@
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
"""
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
Bitmessage mock
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
"""
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
from pybitmessage.class_addressGenerator import addressGenerator
from pybitmessage.class_singleWorker import singleWorker
from pybitmessage.class_objectProcessor import objectProcessor
@ -5,12 +8,14 @@ from pybitmessage.inventory import Inventory
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
from pybitmessage.bmconfigparser import BMConfigParser
class MockMain():
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
# pylint: disable=too-few-public-methods
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
class MockMain:
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
"""Mock main function"""
# pylint: disable=no-self-use
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
def start(self):
"""Start main application"""
# pylint: disable=too-many-statements,too-many-branches,too-many-locals
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
# pylint: disable=too-many-statements,too-many-branches,too-many-locals, unused-variable
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
config = BMConfigParser()
daemon = config.safeGetBoolean('bitmessagesettings', 'daemon')

PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.
PeterSurda commented 2021-12-13 06:46:41 +01:00 (Migrated from github.com)
Review

here it can start launching the mock threads.

here it can start launching the mock threads.