Repository: opentensor/bittensor

Issue:
Discord invite link invalid
Please update discord invite link


Discussion:

Resolving patch:
diff --git a/bittensor/__init__.py b/bittensor/__init__.py
--- a/bittensor/__init__.py
+++ b/bittensor/__init__.py
@@ -27,7 +27,7 @@
 nest_asyncio.apply()
 
 # Bittensor code and protocol version.
-__version__ = '5.3.0'
+__version__ = '5.3.1'
 version_split = __version__.split(".")
 __version_as_int__ = (100 * int(version_split[0])) + (10 * int(version_split[1])) + (1 * int(version_split[2]))
 __new_signature_version__ = 360
diff --git a/bittensor/_subtensor/subtensor_impl.py b/bittensor/_subtensor/subtensor_impl.py
--- a/bittensor/_subtensor/subtensor_impl.py
+++ b/bittensor/_subtensor/subtensor_impl.py
@@ -736,7 +736,7 @@ def is_senate_member(
         hotkey_ss58: str,
         block: Optional[int] = None,
     ) -> bool:
-        senate_members = self.query_module(module="Senate", name="Members", block=block ).serialize()
+        senate_members = self.query_module(module="SenateMembers", name="Members", block=block ).serialize()
         return senate_members.count( hotkey_ss58 ) > 0
     
     def get_vote_data(


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1,18 @@
+# The MIT License (MIT)
+# Copyright © 2022 Yuma Rao
+# Copyright © 2022-2023 Opentensor Foundation
+# Copyright © 2023 Opentensor Technologies
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
+# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
+# the Software.
+
+# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/tests/mocks/__init__.py b/tests/helpers/__init__.py
similarity index 90%
rename from tests/mocks/__init__.py
rename to tests/helpers/__init__.py
--- a/tests/mocks/__init__.py
+++ b/tests/helpers/__init__.py
@@ -15,5 +15,4 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-from .wallet_mock import MockWallet as MockWallet
-from .keyfile_mock import MockKeyfile as MockKeyfile
\ No newline at end of file
+from .helpers import _get_mock_coldkey, _get_mock_hotkey, _get_mock_keypair, _get_mock_wallet, CLOSE_IN_VALUE, MockConsole
diff --git a/tests/helpers.py b/tests/helpers/helpers.py
similarity index 73%
rename from tests/helpers.py
rename to tests/helpers/helpers.py
--- a/tests/helpers.py
+++ b/tests/helpers/helpers.py
@@ -15,15 +15,26 @@
 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-from typing import Union, Optional
-from bittensor import Balance, NeuronInfo, axon_info, PrometheusInfo, Keypair, __ss58_format__
-from scalecodec import ss58_encode
+from typing import Union
+from bittensor import Balance, NeuronInfo, axon_info, PrometheusInfo, __ss58_format__
 from rich.console import Console
 from rich.text import Text
 
-from tests.mocks.wallet_mock import MockWallet
+from bittensor_wallet.mock import MockWallet as _MockWallet, utils as _mock_wallet_utils
+
+_get_mock_coldkey = _mock_wallet_utils.get_mock_coldkey
+_get_mock_hotkey = _mock_wallet_utils.get_mock_hotkey
+_get_mock_keypair = _mock_wallet_utils.get_mock_keypair
+_get_mock_wallet = _mock_wallet_utils.get_mock_wallet
+
+
+def __mock_wallet_factory__(*args, **kwargs) -> _MockWallet:
+    """Returns a mock wallet object."""
+
+    mock_wallet = _get_mock_wallet()
+
+    return mock_wallet
 
-from Crypto.Hash import keccak
 
 class CLOSE_IN_VALUE():
     value: Union[float, int, Balance]
@@ -40,24 +51,7 @@ def __eq__(self, __o: Union[float, int, Balance]) -> bool:
                 ((__o - self.tolerance) <= self.value and self.value <= (__o + self.tolerance))
 
 
-def get_mock_keypair( uid: int, test_name: Optional[str] = None ) -> Keypair:
-    """
-    Returns a mock keypair from a uid and optional test_name.
-    If test_name is not provided, the uid is the only seed.
-    If test_name is provided, the uid is hashed with the test_name to create a unique seed for the test.
-    """
-    if test_name is not None:
-        hashed_test_name: bytes = keccak.new(digest_bits=256, data=test_name.encode('utf-8')).digest()
-        hashed_test_name_as_int: int = int.from_bytes(hashed_test_name, byteorder='big', signed=False)
-        uid = uid + hashed_test_name_as_int
-
-    return Keypair.create_from_seed( seed_hex = int.to_bytes(uid, 32, 'big', signed=False), ss58_format = __ss58_format__)
-
-def get_mock_hotkey( uid: int ) -> str:
-    return get_mock_keypair(uid).ss58_address
 
-def get_mock_coldkey( uid: int ) -> str:
-    return get_mock_keypair(uid).ss58_address
 
 def get_mock_neuron(**kwargs) -> NeuronInfo:
     """
@@ -124,29 +118,11 @@ def get_mock_neuron(**kwargs) -> NeuronInfo:
 def get_mock_neuron_by_uid( uid: int, **kwargs ) -> NeuronInfo:
     return get_mock_neuron(
         uid = uid,
-        hotkey = get_mock_hotkey(uid),
-        coldkey = get_mock_coldkey(uid),
+        hotkey = _get_mock_hotkey(uid),
+        coldkey = _get_mock_coldkey(uid),
         **kwargs
     )
 
-def get_mock_wallet(coldkey: "Keypair" = None, hotkey: "Keypair" = None):
-    wallet = MockWallet(
-        name = 'mock_wallet',
-        hotkey = 'mock',
-        path = '/tmp/mock_wallet',
-    )
-
-    if not coldkey:
-        coldkey = Keypair.create_from_mnemonic(Keypair.generate_mnemonic())
-    if not hotkey:
-        hotkey = Keypair.create_from_mnemonic(Keypair.generate_mnemonic())
-
-    wallet.set_coldkey(coldkey, encrypt=False, overwrite=True)
-    wallet.set_coldkeypub(coldkey, encrypt=False, overwrite=True)
-    wallet.set_hotkey(hotkey, encrypt=False, overwrite=True)
-
-    return wallet
-
 class MockStatus:
     def __enter__(self):
         return self
diff --git a/tests/integration_tests/__init__.py b/tests/integration_tests/__init__.py
new file mode 100644
diff --git a/tests/integration_tests/test_cli.py b/tests/integration_tests/test_cli.py
--- a/tests/integration_tests/test_cli.py
+++ b/tests/integration_tests/test_cli.py
@@ -30,7 +30,7 @@
 
 import bittensor
 from bittensor.utils.balance import Balance
-from tests.helpers import MockConsole, get_mock_keypair, get_mock_wallet as generate_wallet
+from tests.helpers import MockConsole, _get_mock_keypair, _get_mock_wallet as generate_wallet
 from bittensor._subtensor.subtensor_mock import MockSubtensor
 
 
@@ -109,7 +109,7 @@ def test_overview(self):
 
         mock_hotkeys = ["hk0", "hk1", "hk2", "hk3", "hk4"]
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -117,7 +117,7 @@ def test_overview(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
                 coldkeypub_file=MagicMock(
                     exists_on_device=MagicMock(return_value=True)  # Wallet exists
                 ),
@@ -216,7 +216,7 @@ def test_overview_not_in_first_subnet(self):
 
         mock_hotkeys = ["hk0", "hk1", "hk2", "hk3", "hk4"]
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -224,7 +224,7 @@ def test_overview_not_in_first_subnet(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
                 coldkeypub_file=MagicMock(
                     exists_on_device=MagicMock(return_value=True)  # Wallet exists
                 ),
@@ -470,7 +470,7 @@ def test_unstake_with_specific_hotkeys(self):
             "hk2": bittensor.Balance.from_float(12.2),
         }
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -478,7 +478,7 @@ def test_unstake_with_specific_hotkeys(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -547,7 +547,7 @@ def test_unstake_with_all_hotkeys(self):
             "hk2": bittensor.Balance.from_float(12.2),
         }
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -555,7 +555,7 @@ def test_unstake_with_all_hotkeys(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(list(mock_stakes.keys()))
         ]
@@ -625,7 +625,7 @@ def test_unstake_with_exclude_hotkeys_from_all(self):
             "hk2": bittensor.Balance.from_float(12.2),
         }
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -633,7 +633,7 @@ def test_unstake_with_exclude_hotkeys_from_all(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(list(mock_stakes.keys()))
         ]
@@ -710,7 +710,7 @@ def test_unstake_with_multiple_hotkeys_max_stake(self):
             "hk2": bittensor.Balance.from_float(12.2),
         }
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -718,7 +718,7 @@ def test_unstake_with_multiple_hotkeys_max_stake(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(list(mock_stakes.keys()))
         ]
@@ -792,7 +792,7 @@ def test_stake_with_specific_hotkeys(self):
 
         mock_balance = bittensor.Balance.from_float(22.2)
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -800,7 +800,7 @@ def test_stake_with_specific_hotkeys(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -867,7 +867,7 @@ def test_stake_with_all_hotkeys(self):
 
         mock_balance = bittensor.Balance.from_float(22.0)
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -875,7 +875,7 @@ def test_stake_with_all_hotkeys(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(mock_hotkeys)
         ]
@@ -965,7 +965,7 @@ def test_stake_with_exclude_hotkeys_from_all(self):
 
         mock_balance = bittensor.Balance.from_float(25.0)
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -973,7 +973,7 @@ def test_stake_with_exclude_hotkeys_from_all(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(mock_hotkeys)
         ]
@@ -1071,7 +1071,7 @@ def test_stake_with_multiple_hotkeys_max_stake(self):
             "hk2": bittensor.Balance.from_float(0.0),
         }
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -1079,7 +1079,7 @@ def test_stake_with_multiple_hotkeys_max_stake(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -1180,7 +1180,7 @@ def test_stake_with_multiple_hotkeys_max_stake_not_enough_balance(self):
             15.0 * 2
         )  # Not enough for all hotkeys
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -1188,7 +1188,7 @@ def test_stake_with_multiple_hotkeys_max_stake_not_enough_balance(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -1273,7 +1273,7 @@ def test_stake_with_single_hotkey_max_stake(self):
 
         mock_balance = bittensor.Balance.from_float(15.0 * 3)
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -1281,7 +1281,7 @@ def test_stake_with_single_hotkey_max_stake(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -1361,7 +1361,7 @@ def test_stake_with_single_hotkey_max_stake_not_enough_balance(self):
 
         mock_balance = bittensor.Balance.from_float(1.0)  # Not enough balance to do max
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -1369,7 +1369,7 @@ def test_stake_with_single_hotkey_max_stake_not_enough_balance(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -1456,7 +1456,7 @@ def test_stake_with_single_hotkey_max_stake_enough_stake(self):
             "hk0": bittensor.Balance.from_float(config.max_stake * 2)
         }
 
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
 
         mock_wallets = [
             SimpleNamespace(
@@ -1464,7 +1464,7 @@ def test_stake_with_single_hotkey_max_stake_enough_stake(self):
                 coldkey=mock_coldkey_kp,
                 coldkeypub=mock_coldkey_kp,
                 hotkey_str=hk,
-                hotkey=get_mock_keypair(idx + 100, self.id()),
+                hotkey=_get_mock_keypair(idx + 100, self.id()),
             )
             for idx, hk in enumerate(config.hotkeys)
         ]
@@ -1552,10 +1552,10 @@ def test_nominate(self):
 
         mock_wallet = SimpleNamespace(
             name="w0",
-            coldkey=get_mock_keypair(0, self.id()),
-            coldkeypub=get_mock_keypair(0, self.id()),
+            coldkey=_get_mock_keypair(0, self.id()),
+            coldkeypub=_get_mock_keypair(0, self.id()),
             hotkey_str="hk0",
-            hotkey=get_mock_keypair(0 + 100, self.id()),
+            hotkey=_get_mock_keypair(0 + 100, self.id()),
         )
 
         # Register mock wallet and give it a balance
@@ -1615,10 +1615,10 @@ def test_delegate_stake(self):
             for idx_hk, hk in enumerate(list(mock_balances[wallet_name].keys())):
                 wallet = SimpleNamespace(
                     name=wallet_name,
-                    coldkey=get_mock_keypair(idx, self.id()),
-                    coldkeypub=get_mock_keypair(idx, self.id()),
+                    coldkey=_get_mock_keypair(idx, self.id()),
+                    coldkeypub=_get_mock_keypair(idx, self.id()),
                     hotkey_str=hk,
-                    hotkey=get_mock_keypair(idx * 100 + idx_hk, self.id()),
+                    hotkey=_get_mock_keypair(idx * 100 + idx_hk, self.id()),
                 )
                 mock_wallets.append(wallet)
 
@@ -1704,10 +1704,10 @@ def test_undelegate_stake(self):
             for idx_hk, hk in enumerate(list(mock_balances[wallet_name].keys())):
                 wallet = SimpleNamespace(
                     name=wallet_name,
-                    coldkey=get_mock_keypair(idx, self.id()),
-                    coldkeypub=get_mock_keypair(idx, self.id()),
+                    coldkey=_get_mock_keypair(idx, self.id()),
+                    coldkeypub=_get_mock_keypair(idx, self.id()),
                     hotkey_str=hk,
-                    hotkey=get_mock_keypair(idx * 100 + idx_hk, self.id()),
+                    hotkey=_get_mock_keypair(idx * 100 + idx_hk, self.id()),
                 )
                 mock_wallets.append(wallet)
 
@@ -1803,8 +1803,8 @@ def test_transfer(self):
         for idx, wallet_name in enumerate(list(mock_balances.keys())):
             wallet = SimpleNamespace(
                 name=wallet_name,
-                coldkey=get_mock_keypair(idx, self.id()),
-                coldkeypub=get_mock_keypair(idx, self.id()),
+                coldkey=_get_mock_keypair(idx, self.id()),
+                coldkeypub=_get_mock_keypair(idx, self.id()),
             )
             mock_wallets.append(wallet)
 
@@ -1873,8 +1873,8 @@ def test_transfer_not_enough_balance(self):
         for idx, wallet_name in enumerate(list(mock_balances.keys())):
             wallet = SimpleNamespace(
                 name=wallet_name,
-                coldkey=get_mock_keypair(idx, self.id()),
-                coldkeypub=get_mock_keypair(idx, self.id()),
+                coldkey=_get_mock_keypair(idx, self.id()),
+                coldkeypub=_get_mock_keypair(idx, self.id()),
             )
             mock_wallets.append(wallet)
 
@@ -1944,7 +1944,7 @@ def test_register(self):
         config.no_prompt = True
 
         mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -1973,7 +1973,7 @@ def test_recycle_register(self):
         config.no_prompt = True
 
         mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -2013,7 +2013,7 @@ def test_stake(self):
         subtensor = bittensor.subtensor(config)
 
         mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -2061,8 +2061,8 @@ def register_mock_neuron(
         ) -> int:
             mock_nn.append(
                 SimpleNamespace(
-                    hotkey=get_mock_keypair(i + 100, self.id()).ss58_address,
-                    coldkey=get_mock_keypair(i, self.id()).ss58_address,
+                    hotkey=_get_mock_keypair(i + 100, self.id()).ss58_address,
+                    coldkey=_get_mock_keypair(i, self.id()).ss58_address,
                     balance=Balance.from_rao(random.randint(0, 2**45)).rao,
                     stake=Balance.from_rao(random.randint(0, 2**45)).rao,
                 )
@@ -2186,12 +2186,12 @@ def test_delegate(self):
         Test delegate add command
         """
         mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
         delegate_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+            hotkey = _get_mock_keypair(
                 100 + 1, self.id()
             )
         )
diff --git a/tests/integration_tests/test_cli_no_network.py b/tests/integration_tests/test_cli_no_network.py
--- a/tests/integration_tests/test_cli_no_network.py
+++ b/tests/integration_tests/test_cli_no_network.py
@@ -24,7 +24,7 @@
 from copy import deepcopy
 import re
 
-from tests.helpers import get_mock_coldkey
+from tests.helpers import _get_mock_coldkey
 
 import bittensor
 
@@ -721,7 +721,7 @@ def test_delegate_prompt_wallet_name(self):
         base_args = [
             'delegate',
             '--all',
-            '--delegate_ss58key', get_mock_coldkey(0)
+            '--delegate_ss58key', _get_mock_coldkey(0)
         ]
         # Patch command to exit early
         with patch('bittensor._cli.commands.delegates.DelegateStakeCommand.run', return_value=None):
@@ -762,7 +762,7 @@ def test_undelegate_prompt_wallet_name(self):
         base_args = [
             'undelegate',
             '--all',
-            '--delegate_ss58key', get_mock_coldkey(0)
+            '--delegate_ss58key', _get_mock_coldkey(0)
         ]
         # Patch command to exit early
         with patch('bittensor._cli.commands.delegates.DelegateUnstakeCommand.run', return_value=None):
@@ -809,7 +809,7 @@ def test_delegate_prompt_hotkey(self):
             '--wallet.name', 'mock', 
         ]
 
-        delegate_ss58 = get_mock_coldkey(0)
+        delegate_ss58 = _get_mock_coldkey(0)
         with patch('bittensor._cli.commands.delegates.show_delegates'):
             with patch('bittensor.Subtensor.get_delegates', return_value=[
                 bittensor.DelegateInfo(
@@ -869,7 +869,7 @@ def test_undelegate_prompt_hotkey(self):
             '--wallet.name', 'mock', 
         ]
 
-        delegate_ss58 = get_mock_coldkey(0)
+        delegate_ss58 = _get_mock_coldkey(0)
         with patch('bittensor._cli.commands.delegates.show_delegates'):
             with patch('bittensor.Subtensor.get_delegates', return_value=[
                 bittensor.DelegateInfo(
diff --git a/tests/integration_tests/test_prometheus.py b/tests/integration_tests/test_prometheus.py
--- a/tests/integration_tests/test_prometheus.py
+++ b/tests/integration_tests/test_prometheus.py
@@ -4,7 +4,7 @@
 import unittest
 from unittest.mock import MagicMock, patch
 from bittensor._subtensor.subtensor_mock import MockSubtensor
-from tests.helpers import get_mock_wallet
+from tests.helpers import _get_mock_wallet
 
 _subtensor_mock: MockSubtensor = bittensor.subtensor( network = 'mock', _mock = True )
 
@@ -24,7 +24,7 @@ class TestPrometheus(unittest.TestCase):
 
     def setUp(self):
         self.subtensor = bittensor.subtensor(network = 'mock')
-        self.wallet = get_mock_wallet()
+        self.wallet = _get_mock_wallet()
 
     def test_init_prometheus_success(self):
         with patch.object(self.subtensor, '_do_serve_prometheus', return_value = (True, None)):
diff --git a/tests/integration_tests/test_subtensor_integration.py b/tests/integration_tests/test_subtensor_integration.py
--- a/tests/integration_tests/test_subtensor_integration.py
+++ b/tests/integration_tests/test_subtensor_integration.py
@@ -28,7 +28,7 @@
 from bittensor.utils.balance import Balance
 from substrateinterface import Keypair
 from bittensor._subtensor.subtensor_mock import MockSubtensor
-from tests.helpers import get_mock_hotkey, get_mock_coldkey, MockConsole, get_mock_keypair, get_mock_wallet
+from tests.helpers import _get_mock_hotkey, _get_mock_coldkey, MockConsole, _get_mock_keypair, _get_mock_wallet
 
 class TestSubtensor(unittest.TestCase):
     _mock_console_patcher = None
@@ -36,9 +36,9 @@ class TestSubtensor(unittest.TestCase):
     subtensor: MockSubtensor
 
     def setUp(self):
-        self.wallet = get_mock_wallet(
-            hotkey = get_mock_keypair(0, self.id()),
-            coldkey = get_mock_keypair(1, self.id())
+        self.wallet = _get_mock_wallet(
+            hotkey = _get_mock_keypair(0, self.id()),
+            coldkey = _get_mock_keypair(1, self.id())
         )
         self.balance = Balance.from_tao(1000)
         self.mock_neuron = MagicMock() # NOTE: this might need more sophistication
@@ -212,7 +212,7 @@ def test_stake_failed( self ):
                 self.assertFalse(fail, msg="Stake should fail")
 
     def test_transfer( self ):
-        fake_coldkey = get_mock_coldkey(1)
+        fake_coldkey = _get_mock_coldkey(1)
         
         self.subtensor._do_transfer = MagicMock(return_value = (True, '0x', None))
         self.subtensor.register = MagicMock(return_value = True)
@@ -225,7 +225,7 @@ def test_transfer( self ):
         self.assertTrue(success, msg="Transfer should succeed")
 
     def test_transfer_inclusion( self ):
-        fake_coldkey = get_mock_coldkey(1)
+        fake_coldkey = _get_mock_coldkey(1)
         self.subtensor._do_transfer = MagicMock(return_value = (True, '0x', None))
         self.subtensor.register = MagicMock(return_value = True)
         self.subtensor.get_neuron_for_pubkey_and_subnet = MagicMock(return_value = self.mock_neuron)
@@ -239,7 +239,7 @@ def test_transfer_inclusion( self ):
         self.assertTrue(success, msg="Transfer should succeed")
 
     def test_transfer_failed(self ):
-        fake_coldkey = get_mock_coldkey(1)
+        fake_coldkey = _get_mock_coldkey(1)
         self.subtensor._do_transfer = MagicMock(return_value = (False, None, 'Mock failure message'))
 
         fail= self.subtensor.transfer(self.wallet,
@@ -250,7 +250,7 @@ def test_transfer_failed(self ):
         self.assertFalse(fail, msg="Transfer should fail")
 
     def test_transfer_invalid_dest(self ):
-        fake_coldkey = get_mock_coldkey(1)
+        fake_coldkey = _get_mock_coldkey(1)
 
         fail = self.subtensor.transfer(self.wallet,
                             fake_coldkey[:-1], # invalid dest
@@ -260,7 +260,7 @@ def test_transfer_invalid_dest(self ):
         self.assertFalse(fail, msg="Transfer should fail because of invalid dest")
 
     def test_transfer_dest_as_bytes(self ):
-        fake_coldkey = get_mock_coldkey(1)
+        fake_coldkey = _get_mock_coldkey(1)
         self.subtensor._do_transfer = MagicMock(return_value = (True, '0x', None))
 
         self.subtensor.register = MagicMock(return_value = True)
@@ -319,7 +319,7 @@ def test_set_weights_failed( self ):
         assert fail == False
 
     def test_get_balance( self ):
-        fake_coldkey = get_mock_coldkey(0)
+        fake_coldkey = _get_mock_coldkey(0)
         balance= self.subtensor.get_balance(address=fake_coldkey)
         assert type(balance) == bittensor.utils.balance.Balance
 
@@ -330,8 +330,8 @@ def test_get_balances( self ):
             assert type(balances[i]) == bittensor.utils.balance.Balance
 
     def test_get_uid_by_hotkey_on_subnet( self ):
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
-        mock_hotkey_kp = get_mock_keypair(100, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
+        mock_hotkey_kp = _get_mock_keypair(100, self.id())
 
         # Register on subnet 3
         mock_uid = self.subtensor.force_register_neuron(
@@ -345,8 +345,8 @@ def test_get_uid_by_hotkey_on_subnet( self ):
         self.assertEqual(uid, mock_uid, msg="get_uid_for_hotkey_on_subnet should return the correct uid")
 
     def test_is_hotkey_registered( self ):
-        mock_coldkey_kp = get_mock_keypair(0, self.id())
-        mock_hotkey_kp = get_mock_keypair(100, self.id())
+        mock_coldkey_kp = _get_mock_keypair(0, self.id())
+        mock_hotkey_kp = _get_mock_keypair(100, self.id())
 
         # Register on subnet 3
         _ = self.subtensor.force_register_neuron(
@@ -359,7 +359,7 @@ def test_is_hotkey_registered( self ):
         self.assertTrue(registered, msg="Hotkey should be registered")
 
     def test_is_hotkey_registered_not_registered( self ):
-        mock_hotkey_kp = get_mock_keypair(100, self.id())
+        mock_hotkey_kp = _get_mock_keypair(100, self.id())
 
         # Do not register on subnet 3
 
@@ -381,9 +381,9 @@ def test_registration_multiprocessed_already_registered( self ):
                 # patch time queue get to raise Empty exception
                 with patch('multiprocessing.queues.Queue.get_nowait', side_effect=QueueEmpty) as mock_queue_get_nowait:
 
-                    wallet = get_mock_wallet(
-                        hotkey = get_mock_keypair(0, self.id()),
-                        coldkey = get_mock_keypair(1, self.id())
+                    wallet = _get_mock_wallet(
+                        hotkey = _get_mock_keypair(0, self.id()),
+                        coldkey = _get_mock_keypair(1, self.id())
                     )
                     self.subtensor.is_hotkey_registered = MagicMock( side_effect=is_registered_return_values )
 
@@ -414,9 +414,9 @@ def is_registered_side_effect(*args, **kwargs):
 
         with patch('bittensor.Subtensor.get_neuron_for_pubkey_and_subnet', return_value = bittensor.NeuronInfo._null_neuron()):
             with patch('bittensor.Subtensor.difficulty'):
-                wallet = get_mock_wallet(
-                    hotkey = get_mock_keypair(0, self.id()),
-                    coldkey = get_mock_keypair(1, self.id())
+                wallet = _get_mock_wallet(
+                    hotkey = _get_mock_keypair(0, self.id()),
+                    coldkey = _get_mock_keypair(1, self.id())
                 )
 
                 self.subtensor.is_hotkey_registered = MagicMock(side_effect=is_registered_side_effect)
@@ -435,9 +435,9 @@ def test_registration_failed( self ):
         mock_neuron.is_null = True
 
         with patch('bittensor._subtensor.extrinsics.registration.create_pow', return_value=None) as mock_create_pow:
-            wallet = get_mock_wallet(
-                hotkey = get_mock_keypair(0, self.id()),
-                coldkey = get_mock_keypair(1, self.id())
+            wallet = _get_mock_wallet(
+                hotkey = _get_mock_keypair(0, self.id()),
+                coldkey = _get_mock_keypair(1, self.id())
             )
 
             self.subtensor.is_hotkey_registered = MagicMock(side_effect=is_registered_return_values)
diff --git a/tests/mocks/keyfile_mock.py b/tests/mocks/keyfile_mock.py
deleted file mode 100644
--- a/tests/mocks/keyfile_mock.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# The MIT License (MIT)
-
-# Copyright © 2021 Yuma Rao
-# Copyright © 2022 Opentensor Foundation
-# Copyright © 2023 Opentensor Technologies
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
-# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
-# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
-# the Software.
-
-# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-from bittensor_wallet import serialized_keypair_to_keyfile_data, Keyfile
-from bittensor_wallet import Keypair
-
-class MockKeyfile( Keyfile ):
-    """ Defines an interface to a mocked keyfile object (nothing is created on device) keypair is treated as non encrypted and the data is just the string version.
-    """
-    def __init__( self, path: str ):
-        super().__init__( path )
-        
-        self._mock_keypair = Keypair.create_from_mnemonic( mnemonic = 'arrive produce someone view end scout bargain coil slight festival excess struggle' )
-        self._mock_data = serialized_keypair_to_keyfile_data( self._mock_keypair )
-
-    def __str__(self):
-        if not self.exists_on_device():
-            return "Keyfile (empty, {})>".format( self.path )
-        if self.is_encrypted():
-            return "Keyfile (encrypted, {})>".format( self.path )
-        else:
-            return "Keyfile (decrypted, {})>".format( self.path )
-
-    def __repr__(self):
-        return self.__str__()
-
-    @property
-    def keypair( self ) -> 'Keypair':
-        return self._mock_keypair
-
-    @property
-    def data( self ) -> bytes:
-        return bytes(self._mock_data)
-
-    @property
-    def keyfile_data( self ) -> bytes:
-        return bytes( self._mock_data)
-
-    def set_keypair ( self, keypair: 'Keypair', encrypt: bool = True, overwrite: bool = False, password:str = None):
-        self._mock_keypair = keypair
-        self._mock_data = serialized_keypair_to_keyfile_data( self._mock_keypair )
-
-    def get_keypair(self, password: str = None) -> 'Keypair':
-        return self._mock_keypair
-
-    def make_dirs( self ):
-        return
-
-    def exists_on_device( self ) -> bool:
-        return True
-
-    def is_readable( self ) -> bool:
-        return True
-
-    def is_writable( self ) -> bool:
-        return True
-
-    def is_encrypted ( self ) -> bool:
-        return False
-
-    def encrypt( self, password: str = None):
-        raise ValueError('Cannot encrypt a mock keyfile')
-
-    def decrypt( self, password: str = None):
-        return
diff --git a/tests/mocks/wallet_mock.py b/tests/mocks/wallet_mock.py
deleted file mode 100644
--- a/tests/mocks/wallet_mock.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# The MIT License (MIT)
-
-# Copyright © 2021 Yuma Rao
-# Copyright © 2022 Opentensor Foundation
-# Copyright © 2023 Opentensor Technologies
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
-# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
-# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
-# the Software.
-
-# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
-# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-import os
-import bittensor
-import bittensor_wallet
-
-from .keyfile_mock import MockKeyfile
-
-class MockWallet(bittensor_wallet.Wallet):
-    """
-    Mocked Version of the bittensor wallet class, meant to be used for testing
-    """
-    def __init__(
-        self,
-        **kwargs,
-    ):
-        r""" Init bittensor wallet object containing a hot and coldkey.
-            Args:
-                _mock (required=True, default=False):
-                    If true creates a mock wallet with random keys.
-        """
-        super().__init__(**kwargs)
-        # For mocking.
-        self._is_mock = True
-        self._mocked_coldkey_keyfile = None
-        self._mocked_hotkey_keyfile = None
-
-        print("---- MOCKED WALLET INITIALIZED- ---")
-
-    @property
-    def hotkey_file(self) -> 'bittensor_wallet.Keyfile':
-        if self._is_mock:
-            if self._mocked_hotkey_keyfile == None:
-                self._mocked_hotkey_keyfile = MockKeyfile(path='MockedHotkey')
-            return self._mocked_hotkey_keyfile
-        else:
-            wallet_path = os.path.expanduser(os.path.join(self.path, self.name))
-            hotkey_path = os.path.join(wallet_path, "hotkeys", self.hotkey_str)
-            return bittensor.keyfile( path = hotkey_path )
-
-    @property
-    def coldkey_file(self) -> 'bittensor_wallet.Keyfile':
-        if self._is_mock:
-            if self._mocked_coldkey_keyfile == None:
-                self._mocked_coldkey_keyfile = MockKeyfile(path='MockedColdkey')
-            return self._mocked_coldkey_keyfile
-        else:
-            wallet_path = os.path.expanduser(os.path.join(self.path, self.name))
-            coldkey_path = os.path.join(wallet_path, "coldkey")
-            return bittensor.keyfile( path = coldkey_path )
-
-    @property
-    def coldkeypub_file(self) -> 'bittensor_wallet.Keyfile':
-        if self._is_mock:
-            if self._mocked_coldkey_keyfile == None:
-                self._mocked_coldkey_keyfile = MockKeyfile(path='MockedColdkeyPub')
-            return self._mocked_coldkey_keyfile
-        else:
-            wallet_path = os.path.expanduser(os.path.join(self.path, self.name))
-            coldkeypub_path = os.path.join(wallet_path, "coldkeypub.txt")
-            return bittensor_wallet.Keyfile( path = coldkeypub_path )
\ No newline at end of file
diff --git a/tests/unit_tests/__init__.py b/tests/unit_tests/__init__.py
new file mode 100644
diff --git a/tests/unit_tests/bittensor_tests/__init__.py b/tests/unit_tests/bittensor_tests/__init__.py
new file mode 100644
diff --git a/tests/unit_tests/bittensor_tests/test_axon.py b/tests/unit_tests/bittensor_tests/test_axon.py
--- a/tests/unit_tests/bittensor_tests/test_axon.py
+++ b/tests/unit_tests/bittensor_tests/test_axon.py
@@ -26,7 +26,7 @@
 import bittensor
 from bittensor.utils.test_utils import get_random_unused_port
 
-from tests.helpers import get_mock_wallet, get_mock_keypair
+from tests.helpers import _get_mock_wallet, _get_mock_keypair
 
 def gen_nonce():
     return f"{time.monotonic_ns()}"
@@ -54,16 +54,16 @@ def is_port_in_use(port):
 class TestAxon(unittest.TestCase):
     @classmethod
     def setUpClass(cls) -> None:
-        cls.wallet = wallet = get_mock_wallet(
-            coldkey = get_mock_keypair(0, cls.__name__),
-            hotkey= get_mock_keypair(100 + 0, cls.__name__),
+        cls.wallet = wallet = _get_mock_wallet(
+            coldkey = _get_mock_keypair(0, cls.__name__),
+            hotkey= _get_mock_keypair(100 + 0, cls.__name__),
         )
 
         cls.axon = bittensor.axon( wallet = wallet, metagraph = None )
 
-        cls.sender_wallet = get_mock_wallet(
-            coldkey = get_mock_keypair(1, cls.__name__),
-            hotkey= get_mock_keypair(100 + 1, cls.__name__),
+        cls.sender_wallet = _get_mock_wallet(
+            coldkey = _get_mock_keypair(1, cls.__name__),
+            hotkey= _get_mock_keypair(100 + 1, cls.__name__),
         )
 
 
diff --git a/tests/unit_tests/bittensor_tests/test_balance.py b/tests/unit_tests/bittensor_tests/test_balance.py
--- a/tests/unit_tests/bittensor_tests/test_balance.py
+++ b/tests/unit_tests/bittensor_tests/test_balance.py
@@ -20,10 +20,11 @@
 
 import pytest
 from bittensor import Balance
-from tests.helpers import CLOSE_IN_VALUE
 from hypothesis import given
 from hypothesis import strategies as st
 
+from tests.helpers import CLOSE_IN_VALUE
+
 """
 Test the Balance class
 """
diff --git a/tests/unit_tests/bittensor_tests/utils/__init__.py b/tests/unit_tests/bittensor_tests/utils/__init__.py
new file mode 100644
diff --git a/tests/unit_tests/bittensor_tests/utils/test_utils.py b/tests/unit_tests/bittensor_tests/utils/test_utils.py
--- a/tests/unit_tests/bittensor_tests/utils/test_utils.py
+++ b/tests/unit_tests/bittensor_tests/utils/test_utils.py
@@ -26,8 +26,7 @@
 from bittensor.utils.registration import _CUDASolver, _SolverBase
 from bittensor._subtensor.subtensor_mock import MockSubtensor
 
-from tests.mocks.wallet_mock import MockWallet
-from tests.helpers import get_mock_wallet as generate_wallet, get_mock_keypair
+from tests.helpers import _get_mock_wallet as _generate_wallet, _get_mock_keypair
 
 
 @fixture(scope="function")
@@ -665,8 +664,8 @@ def _do_setup_subnet(cls):
         )
 
     def test_wallet_reregister_reregister_false(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -686,8 +685,8 @@ class MockException(Exception):
             mock_register.assert_not_called() # should not call register
 
     def test_wallet_reregister_reregister_false_and_registered_already(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -716,8 +715,8 @@ class MockException(Exception):
             mock_register.assert_not_called() # should not call register
 
     def test_wallet_reregister_reregister_true_and_registered_already(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -747,8 +746,8 @@ class MockException(Exception):
 
 
     def test_wallet_reregister_no_params(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -770,8 +769,8 @@ class MockException(Exception):
             mock_register.assert_called_once() # should call register once
 
     def test_wallet_reregister_use_cuda_flag_true(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -799,8 +798,8 @@ class MockException(Exception):
             self.assertEqual(kwargs['cuda'], True) 
 
     def test_wallet_reregister_use_cuda_flag_false(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )
@@ -827,8 +826,8 @@ class MockException(Exception):
             self.assertEqual(kwargs['cuda'], False)
 
     def test_wallet_reregister_cuda_arg_not_specified_should_be_false(self):
-        mock_wallet = generate_wallet(
-            hotkey = get_mock_keypair(
+        mock_wallet = _generate_wallet(
+            hotkey = _get_mock_keypair(
                 100, self.id()
             )
         )