diff --git a/bittensor/__init__.py b/bittensor/__init__.py index 2cd43f0e87..2acd368727 100644 --- a/bittensor/__init__.py +++ b/bittensor/__init__.py @@ -80,9 +80,9 @@ def turn_console_off(): __local_entrypoint__ = "ws://127.0.0.1:9945" -__tao_symbol__: str = u'\u03C4'.encode('utf-8') +__tao_symbol__: str = chr(0x03C4) -__rao_symbol__: str = u"\u03C1".encode('utf-8') +__rao_symbol__: str = chr(0x03C1) # Block Explorers map network to explorer url ## Must all be polkadotjs explorer urls diff --git a/bittensor/_cli/commands/delegates.py b/bittensor/_cli/commands/delegates.py index 2ac1089b6f..9667cde9c5 100644 --- a/bittensor/_cli/commands/delegates.py +++ b/bittensor/_cli/commands/delegates.py @@ -73,6 +73,7 @@ def add_args( parser: argparse.ArgumentParser ): ) delegate_stake_parser.add_argument( '--delegate_ss58key', + '--delegate_ss58', dest = "delegate_ss58key", type = str, required = False, @@ -164,6 +165,7 @@ def add_args( parser: argparse.ArgumentParser ): ) undelegate_stake_parser.add_argument( '--delegate_ss58key', + '--delegate_ss58', dest = "delegate_ss58key", type = str, required = False, diff --git a/tests/integration_tests/test_cli.py b/tests/integration_tests/test_cli.py index 14403095cd..f3dbb3f7a8 100644 --- a/tests/integration_tests/test_cli.py +++ b/tests/integration_tests/test_cli.py @@ -374,7 +374,7 @@ def mock_get_wallet(*args, **kwargs): else: return mock_wallets[0] # TODO: Fix mocking here - with patch('bittensor.cli_utils.get_hotkey_wallets_for_wallet') as mock_get_all_wallets: + with patch('bittensor._cli.commands.unstake.get_hotkey_wallets_for_wallet') as mock_get_all_wallets: mock_get_all_wallets.side_effect = mock_get_wallet # Check stakes before unstaking @@ -443,7 +443,7 @@ def mock_get_wallet(*args, **kwargs): else: return mock_wallets[0] - with patch('bittensor.cli_utils.get_hotkey_wallets_for_wallet') as mock_get_all_wallets: + with patch('bittensor._cli.commands.unstake.get_hotkey_wallets_for_wallet') as mock_get_all_wallets: mock_get_all_wallets.side_effect = mock_get_wallet # Check stakes before unstaking @@ -519,7 +519,7 @@ def mock_get_wallet(*args, **kwargs): else: return mock_wallets[0] - with patch('bittensor.cli_utils.get_hotkey_wallets_for_wallet') as mock_get_all_wallets: + with patch('bittensor._cli.commands.unstake.get_hotkey_wallets_for_wallet') as mock_get_all_wallets: mock_get_all_wallets.side_effect = mock_get_wallet # Check stakes before unstaking @@ -671,7 +671,7 @@ def mock_get_wallet(*args, **kwargs): with patch('bittensor.wallet') as mock_create_wallet: mock_create_wallet.side_effect = mock_get_wallet - with patch('bittensor.cli_utils.get_hotkey_wallets_for_wallet') as mock_get_hotkey_wallets_for_wallet: + with patch('bittensor._cli.commands.stake.get_hotkey_wallets_for_wallet') as mock_get_hotkey_wallets_for_wallet: mock_get_hotkey_wallets_for_wallet.return_value = mock_wallets # Check stakes before staking @@ -1171,7 +1171,6 @@ def mock_get_wallet(*args, **kwargs): ) self.assertGreaterEqual(balance.tao, mock_balance.tao - config.max_stake) - def test_stake_with_single_hotkey_max_stake_enough_stake( self ): # tests max stake when stake >= max_stake already config = self.config diff --git a/tests/mock_subtensor/bin/Linux/node-subtensor b/tests/mock_subtensor/bin/Linux/node-subtensor new file mode 100644 index 0000000000..e9a9197379 Binary files /dev/null and b/tests/mock_subtensor/bin/Linux/node-subtensor differ