From 6d8c7f3bbc956e80cc8797e2deb18121d15fba8e Mon Sep 17 00:00:00 2001 From: anand k Date: Wed, 20 Mar 2024 07:27:38 +0530 Subject: [PATCH] Renamed mock dir to mockpb --- 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/{mock => mockpb}/__init__.py | 0 src/{mock => mockpb}/class_addressGenerator.py | 0 src/{mock => mockpb}/helper_startup.py | 0 src/{mock => mockpb}/kivy_main.py | 6 +++--- src/{mock => mockpb}/multiqueue.py | 0 src/{mock => mockpb}/network.py | 0 src/tests/{mock => mockpb}/__init__.py | 0 src/tests/{mock => mockpb}/bitmessagemock.py | 0 src/tests/{mock => mockpb}/images | 0 src/tests/{mock => mockpb}/kivy_main.py | 0 src/tests/{mock => mockpb}/pybitmessage/__init__.py | 0 src/tests/{mock => mockpb}/pybitmessage/addresses.py | 0 src/tests/{mock => mockpb}/pybitmessage/bmconfigparser.py | 0 .../{mock => mockpb}/pybitmessage/class_addressGenerator.py | 0 src/tests/{mock => mockpb}/pybitmessage/inventory.py | 0 src/tests/{mock => mockpb}/pybitmessage/network/__init__.py | 0 src/tests/{mock => mockpb}/pybitmessage/network/threads.py | 0 src/tests/{mock => mockpb}/pybitmessage/queues.py | 0 src/tests/{mock => mockpb}/pybitmessage/shutdown.py | 0 src/tests/{mock => mockpb}/pybitmessage/singleton.py | 0 src/tests/{mock => mockpb}/pybitmessage/state.py | 0 src/tests/partial.py | 2 +- 27 files changed, 10 insertions(+), 10 deletions(-) rename src/{mock => mockpb}/__init__.py (100%) rename src/{mock => mockpb}/class_addressGenerator.py (100%) rename src/{mock => mockpb}/helper_startup.py (100%) rename src/{mock => mockpb}/kivy_main.py (84%) rename src/{mock => mockpb}/multiqueue.py (100%) rename src/{mock => mockpb}/network.py (100%) rename src/tests/{mock => mockpb}/__init__.py (100%) rename src/tests/{mock => mockpb}/bitmessagemock.py (100%) rename src/tests/{mock => mockpb}/images (100%) rename src/tests/{mock => mockpb}/kivy_main.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/__init__.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/addresses.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/bmconfigparser.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/class_addressGenerator.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/inventory.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/network/__init__.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/network/threads.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/queues.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/shutdown.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/singleton.py (100%) rename src/tests/{mock => mockpb}/pybitmessage/state.py (100%) diff --git a/docs/conf.py b/docs/conf.py index 0e634eb0..5b6bca03 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.mock', + 'pybitmessage.mockpb', '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', 'mock', 'main.py', 'navigationdrawer', 'network/http*', + 'kivymd', 'mockpb', 'main.py', 'navigationdrawer', 'network/http*', 'src', 'tests', 'version.py' ] apidoc_module_first = True diff --git a/setup.py b/setup.py index 14c18164..259131f0 100644 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ if __name__ == "__main__": ) if os.environ.get('INSTALL_TESTS', False): - packages.extend(['pybitmessage.mock', 'pybitmessage.backend', 'pybitmessage.bitmessagekivy.tests']) + packages.extend(['pybitmessage.mockpb', '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 da5ea492..ddc65954 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.mock import kivy_main + from pybitmessage.mockpb 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 4c024e52..7d8956c1 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.mock.helper_startup import loadConfig, total_encrypted_messages_per_month +from pybitmessage.mockpb.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 460a76f9..051769df 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', 'mock', 'kivy_main.py')] + cmd_entrypoint = [os.path.join(os.path.abspath(os.getcwd()), 'src', 'mockpb', 'kivy_main.py')] @classmethod def setUpClass(cls): diff --git a/src/mock/__init__.py b/src/mockpb/__init__.py similarity index 100% rename from src/mock/__init__.py rename to src/mockpb/__init__.py diff --git a/src/mock/class_addressGenerator.py b/src/mockpb/class_addressGenerator.py similarity index 100% rename from src/mock/class_addressGenerator.py rename to src/mockpb/class_addressGenerator.py diff --git a/src/mock/helper_startup.py b/src/mockpb/helper_startup.py similarity index 100% rename from src/mock/helper_startup.py rename to src/mockpb/helper_startup.py diff --git a/src/mock/kivy_main.py b/src/mockpb/kivy_main.py similarity index 84% rename from src/mock/kivy_main.py rename to src/mockpb/kivy_main.py index 765c69ea..58582862 100644 --- a/src/mock/kivy_main.py +++ b/src/mockpb/kivy_main.py @@ -5,7 +5,7 @@ import os from kivy.config import Config -from pybitmessage.mock import multiqueue +from pybitmessage.mockpb 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.mock.class_addressGenerator import FakeAddressGenerator # noqa:E402 +from pybitmessage.mockpb.class_addressGenerator import FakeAddressGenerator # noqa:E402 from pybitmessage.bitmessagekivy.mpybit import NavigateApp # noqa:E402 -from pybitmessage.mock import network # noqa:E402 +from pybitmessage.mockpb import network # noqa:E402 stats = network.stats objectracker = network.objectracker diff --git a/src/mock/multiqueue.py b/src/mockpb/multiqueue.py similarity index 100% rename from src/mock/multiqueue.py rename to src/mockpb/multiqueue.py diff --git a/src/mock/network.py b/src/mockpb/network.py similarity index 100% rename from src/mock/network.py rename to src/mockpb/network.py diff --git a/src/tests/mock/__init__.py b/src/tests/mockpb/__init__.py similarity index 100% rename from src/tests/mock/__init__.py rename to src/tests/mockpb/__init__.py diff --git a/src/tests/mock/bitmessagemock.py b/src/tests/mockpb/bitmessagemock.py similarity index 100% rename from src/tests/mock/bitmessagemock.py rename to src/tests/mockpb/bitmessagemock.py diff --git a/src/tests/mock/images b/src/tests/mockpb/images similarity index 100% rename from src/tests/mock/images rename to src/tests/mockpb/images diff --git a/src/tests/mock/kivy_main.py b/src/tests/mockpb/kivy_main.py similarity index 100% rename from src/tests/mock/kivy_main.py rename to src/tests/mockpb/kivy_main.py diff --git a/src/tests/mock/pybitmessage/__init__.py b/src/tests/mockpb/pybitmessage/__init__.py similarity index 100% rename from src/tests/mock/pybitmessage/__init__.py rename to src/tests/mockpb/pybitmessage/__init__.py diff --git a/src/tests/mock/pybitmessage/addresses.py b/src/tests/mockpb/pybitmessage/addresses.py similarity index 100% rename from src/tests/mock/pybitmessage/addresses.py rename to src/tests/mockpb/pybitmessage/addresses.py diff --git a/src/tests/mock/pybitmessage/bmconfigparser.py b/src/tests/mockpb/pybitmessage/bmconfigparser.py similarity index 100% rename from src/tests/mock/pybitmessage/bmconfigparser.py rename to src/tests/mockpb/pybitmessage/bmconfigparser.py diff --git a/src/tests/mock/pybitmessage/class_addressGenerator.py b/src/tests/mockpb/pybitmessage/class_addressGenerator.py similarity index 100% rename from src/tests/mock/pybitmessage/class_addressGenerator.py rename to src/tests/mockpb/pybitmessage/class_addressGenerator.py diff --git a/src/tests/mock/pybitmessage/inventory.py b/src/tests/mockpb/pybitmessage/inventory.py similarity index 100% rename from src/tests/mock/pybitmessage/inventory.py rename to src/tests/mockpb/pybitmessage/inventory.py diff --git a/src/tests/mock/pybitmessage/network/__init__.py b/src/tests/mockpb/pybitmessage/network/__init__.py similarity index 100% rename from src/tests/mock/pybitmessage/network/__init__.py rename to src/tests/mockpb/pybitmessage/network/__init__.py diff --git a/src/tests/mock/pybitmessage/network/threads.py b/src/tests/mockpb/pybitmessage/network/threads.py similarity index 100% rename from src/tests/mock/pybitmessage/network/threads.py rename to src/tests/mockpb/pybitmessage/network/threads.py diff --git a/src/tests/mock/pybitmessage/queues.py b/src/tests/mockpb/pybitmessage/queues.py similarity index 100% rename from src/tests/mock/pybitmessage/queues.py rename to src/tests/mockpb/pybitmessage/queues.py diff --git a/src/tests/mock/pybitmessage/shutdown.py b/src/tests/mockpb/pybitmessage/shutdown.py similarity index 100% rename from src/tests/mock/pybitmessage/shutdown.py rename to src/tests/mockpb/pybitmessage/shutdown.py diff --git a/src/tests/mock/pybitmessage/singleton.py b/src/tests/mockpb/pybitmessage/singleton.py similarity index 100% rename from src/tests/mock/pybitmessage/singleton.py rename to src/tests/mockpb/pybitmessage/singleton.py diff --git a/src/tests/mock/pybitmessage/state.py b/src/tests/mockpb/pybitmessage/state.py similarity index 100% rename from src/tests/mock/pybitmessage/state.py rename to src/tests/mockpb/pybitmessage/state.py diff --git a/src/tests/partial.py b/src/tests/partial.py index c88c6031..49e8b586 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 mock import network as network_mock + from mockpb import network as network_mock import network network.stats = network_mock.stats