From b8749c6d7c9ca00b697983b4686db6642fcd319f Mon Sep 17 00:00:00 2001 From: anand-skss <160696255+anand-skss@users.noreply.github.com> Date: Fri, 22 Mar 2024 08:52:02 +0000 Subject: [PATCH] Rename mockpb dir to mockbm --- docs/conf.py | 4 ++-- setup.py | 2 +- src/bitmessagekivy/baseclass/network.py | 2 +- src/bitmessagekivy/mpybit.py | 2 +- src/bitmessagekivy/tests/telenium_process.py | 2 +- src/{mockpb => mockbm}/__init__.py | 0 src/{mockpb => mockbm}/class_addressGenerator.py | 0 src/{mockpb => mockbm}/helper_startup.py | 0 src/{mockpb => mockbm}/kivy_main.py | 6 +++--- src/{mockpb => mockbm}/multiqueue.py | 0 src/{mockpb => mockbm}/network.py | 0 src/tests/{mockpb => mockbm}/__init__.py | 0 src/tests/{mockpb => mockbm}/bitmessagemock.py | 0 src/tests/{mockpb => mockbm}/images | 0 src/tests/{mockpb => mockbm}/kivy_main.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/__init__.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/addresses.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/bmconfigparser.py | 0 .../pybitmessage/class_addressGenerator.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/inventory.py | 0 .../{mockpb => mockbm}/pybitmessage/network/__init__.py | 0 .../{mockpb => mockbm}/pybitmessage/network/threads.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/queues.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/shutdown.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/singleton.py | 0 src/tests/{mockpb => mockbm}/pybitmessage/state.py | 0 src/tests/partial.py | 2 +- 27 files changed, 10 insertions(+), 10 deletions(-) rename src/{mockpb => mockbm}/__init__.py (100%) rename src/{mockpb => mockbm}/class_addressGenerator.py (100%) rename src/{mockpb => mockbm}/helper_startup.py (100%) rename src/{mockpb => mockbm}/kivy_main.py (86%) rename src/{mockpb => mockbm}/multiqueue.py (100%) rename src/{mockpb => mockbm}/network.py (100%) rename src/tests/{mockpb => mockbm}/__init__.py (100%) rename src/tests/{mockpb => mockbm}/bitmessagemock.py (100%) rename src/tests/{mockpb => mockbm}/images (100%) rename src/tests/{mockpb => mockbm}/kivy_main.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/__init__.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/addresses.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/bmconfigparser.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/class_addressGenerator.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/inventory.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/network/__init__.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/network/threads.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/queues.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/shutdown.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/singleton.py (100%) rename src/tests/{mockpb => mockbm}/pybitmessage/state.py (100%) diff --git a/docs/conf.py b/docs/conf.py index 5b6bca03..b0cfef7b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -203,7 +203,7 @@ autodoc_mock_imports = [ 'pybitmessage.bitmessagekivy', 'pybitmessage.bitmessageqt.foldertree', 'pybitmessage.helper_startup', - 'pybitmessage.mockpb', + 'pybitmessage.mockbm', 'pybitmessage.network.httpd', 'pybitmessage.network.https', 'ctypes', @@ -232,7 +232,7 @@ apidoc_excluded_paths = [ 'bitmessageqt/addressvalidator.py', 'bitmessageqt/foldertree.py', 'bitmessageqt/migrationwizard.py', 'bitmessageqt/newaddresswizard.py', 'helper_startup.py', - 'kivymd', 'mockpb', 'main.py', 'navigationdrawer', 'network/http*', + 'kivymd', 'mockbm', 'main.py', 'navigationdrawer', 'network/http*', 'src', 'tests', 'version.py' ] apidoc_module_first = True diff --git a/setup.py b/setup.py index 259131f0..30436bec 100644 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ if __name__ == "__main__": ) if os.environ.get('INSTALL_TESTS', False): - packages.extend(['pybitmessage.mockpb', 'pybitmessage.backend', 'pybitmessage.bitmessagekivy.tests']) + packages.extend(['pybitmessage.mockbm', 'pybitmessage.backend', 'pybitmessage.bitmessagekivy.tests']) package_data[''].extend(['bitmessagekivy/tests/sampleData/*.dat']) # this will silently accept alternative providers of msgpack diff --git a/src/bitmessagekivy/baseclass/network.py b/src/bitmessagekivy/baseclass/network.py index ddc65954..dcb3f082 100644 --- a/src/bitmessagekivy/baseclass/network.py +++ b/src/bitmessagekivy/baseclass/network.py @@ -14,7 +14,7 @@ from kivy.uix.screenmanager import Screen from pybitmessage import state if os.environ.get('INSTALL_TESTS', False) and not state.backend_py3_compatible: - from pybitmessage.mockpb import kivy_main + from pybitmessage.mockbm import kivy_main stats = kivy_main.network.stats objectracker = kivy_main.network.objectracker else: diff --git a/src/bitmessagekivy/mpybit.py b/src/bitmessagekivy/mpybit.py index 7d8956c1..8c3ab4ab 100644 --- a/src/bitmessagekivy/mpybit.py +++ b/src/bitmessagekivy/mpybit.py @@ -45,7 +45,7 @@ from pybitmessage.bitmessagekivy.baseclass.popup import ( from pybitmessage.bitmessagekivy.baseclass.login import * # noqa: F401, F403 from pybitmessage.bitmessagekivy.uikivysignaler import UIkivySignaler -from pybitmessage.mockpb.helper_startup import loadConfig, total_encrypted_messages_per_month +from pybitmessage.mockbm.helper_startup import loadConfig, total_encrypted_messages_per_month logger = logging.getLogger('default') diff --git a/src/bitmessagekivy/tests/telenium_process.py b/src/bitmessagekivy/tests/telenium_process.py index 051769df..0a81044d 100644 --- a/src/bitmessagekivy/tests/telenium_process.py +++ b/src/bitmessagekivy/tests/telenium_process.py @@ -32,7 +32,7 @@ def cleanup(files=_files): class TeleniumTestProcess(TeleniumTestCase): """Setting Screen Functionality Testing""" - cmd_entrypoint = [os.path.join(os.path.abspath(os.getcwd()), 'src', 'mockpb', 'kivy_main.py')] + cmd_entrypoint = [os.path.join(os.path.abspath(os.getcwd()), 'src', 'mockbm', 'kivy_main.py')] @classmethod def setUpClass(cls): diff --git a/src/mockpb/__init__.py b/src/mockbm/__init__.py similarity index 100% rename from src/mockpb/__init__.py rename to src/mockbm/__init__.py diff --git a/src/mockpb/class_addressGenerator.py b/src/mockbm/class_addressGenerator.py similarity index 100% rename from src/mockpb/class_addressGenerator.py rename to src/mockbm/class_addressGenerator.py diff --git a/src/mockpb/helper_startup.py b/src/mockbm/helper_startup.py similarity index 100% rename from src/mockpb/helper_startup.py rename to src/mockbm/helper_startup.py diff --git a/src/mockpb/kivy_main.py b/src/mockbm/kivy_main.py similarity index 86% rename from src/mockpb/kivy_main.py rename to src/mockbm/kivy_main.py index 58582862..4cf4da98 100644 --- a/src/mockpb/kivy_main.py +++ b/src/mockbm/kivy_main.py @@ -5,7 +5,7 @@ import os from kivy.config import Config -from pybitmessage.mockpb import multiqueue +from pybitmessage.mockbm import multiqueue from pybitmessage import state if os.environ.get("INSTALL_TESTS", False): @@ -16,9 +16,9 @@ if os.environ.get("INSTALL_TESTS", False): Config.set("graphics", "left", 0) -from pybitmessage.mockpb.class_addressGenerator import FakeAddressGenerator # noqa:E402 +from pybitmessage.mockbm.class_addressGenerator import FakeAddressGenerator # noqa:E402 from pybitmessage.bitmessagekivy.mpybit import NavigateApp # noqa:E402 -from pybitmessage.mockpb import network # noqa:E402 +from pybitmessage.mockbm import network # noqa:E402 stats = network.stats objectracker = network.objectracker diff --git a/src/mockpb/multiqueue.py b/src/mockbm/multiqueue.py similarity index 100% rename from src/mockpb/multiqueue.py rename to src/mockbm/multiqueue.py diff --git a/src/mockpb/network.py b/src/mockbm/network.py similarity index 100% rename from src/mockpb/network.py rename to src/mockbm/network.py diff --git a/src/tests/mockpb/__init__.py b/src/tests/mockbm/__init__.py similarity index 100% rename from src/tests/mockpb/__init__.py rename to src/tests/mockbm/__init__.py diff --git a/src/tests/mockpb/bitmessagemock.py b/src/tests/mockbm/bitmessagemock.py similarity index 100% rename from src/tests/mockpb/bitmessagemock.py rename to src/tests/mockbm/bitmessagemock.py diff --git a/src/tests/mockpb/images b/src/tests/mockbm/images similarity index 100% rename from src/tests/mockpb/images rename to src/tests/mockbm/images diff --git a/src/tests/mockpb/kivy_main.py b/src/tests/mockbm/kivy_main.py similarity index 100% rename from src/tests/mockpb/kivy_main.py rename to src/tests/mockbm/kivy_main.py diff --git a/src/tests/mockpb/pybitmessage/__init__.py b/src/tests/mockbm/pybitmessage/__init__.py similarity index 100% rename from src/tests/mockpb/pybitmessage/__init__.py rename to src/tests/mockbm/pybitmessage/__init__.py diff --git a/src/tests/mockpb/pybitmessage/addresses.py b/src/tests/mockbm/pybitmessage/addresses.py similarity index 100% rename from src/tests/mockpb/pybitmessage/addresses.py rename to src/tests/mockbm/pybitmessage/addresses.py diff --git a/src/tests/mockpb/pybitmessage/bmconfigparser.py b/src/tests/mockbm/pybitmessage/bmconfigparser.py similarity index 100% rename from src/tests/mockpb/pybitmessage/bmconfigparser.py rename to src/tests/mockbm/pybitmessage/bmconfigparser.py diff --git a/src/tests/mockpb/pybitmessage/class_addressGenerator.py b/src/tests/mockbm/pybitmessage/class_addressGenerator.py similarity index 100% rename from src/tests/mockpb/pybitmessage/class_addressGenerator.py rename to src/tests/mockbm/pybitmessage/class_addressGenerator.py diff --git a/src/tests/mockpb/pybitmessage/inventory.py b/src/tests/mockbm/pybitmessage/inventory.py similarity index 100% rename from src/tests/mockpb/pybitmessage/inventory.py rename to src/tests/mockbm/pybitmessage/inventory.py diff --git a/src/tests/mockpb/pybitmessage/network/__init__.py b/src/tests/mockbm/pybitmessage/network/__init__.py similarity index 100% rename from src/tests/mockpb/pybitmessage/network/__init__.py rename to src/tests/mockbm/pybitmessage/network/__init__.py diff --git a/src/tests/mockpb/pybitmessage/network/threads.py b/src/tests/mockbm/pybitmessage/network/threads.py similarity index 100% rename from src/tests/mockpb/pybitmessage/network/threads.py rename to src/tests/mockbm/pybitmessage/network/threads.py diff --git a/src/tests/mockpb/pybitmessage/queues.py b/src/tests/mockbm/pybitmessage/queues.py similarity index 100% rename from src/tests/mockpb/pybitmessage/queues.py rename to src/tests/mockbm/pybitmessage/queues.py diff --git a/src/tests/mockpb/pybitmessage/shutdown.py b/src/tests/mockbm/pybitmessage/shutdown.py similarity index 100% rename from src/tests/mockpb/pybitmessage/shutdown.py rename to src/tests/mockbm/pybitmessage/shutdown.py diff --git a/src/tests/mockpb/pybitmessage/singleton.py b/src/tests/mockbm/pybitmessage/singleton.py similarity index 100% rename from src/tests/mockpb/pybitmessage/singleton.py rename to src/tests/mockbm/pybitmessage/singleton.py diff --git a/src/tests/mockpb/pybitmessage/state.py b/src/tests/mockbm/pybitmessage/state.py similarity index 100% rename from src/tests/mockpb/pybitmessage/state.py rename to src/tests/mockbm/pybitmessage/state.py diff --git a/src/tests/partial.py b/src/tests/partial.py index 49e8b586..870f6626 100644 --- a/src/tests/partial.py +++ b/src/tests/partial.py @@ -24,7 +24,7 @@ class TestPartialRun(unittest.TestCase): from debug import logger # noqa:F401 pylint: disable=unused-variable if sys.hexversion >= 0x3000000: # pylint: disable=no-name-in-module,relative-import - from mockpb import network as network_mock + from mockbm import network as network_mock import network network.stats = network_mock.stats