diff --git a/bittensor_cli/src/commands/subnets/subnets.py b/bittensor_cli/src/commands/subnets/subnets.py index 509e36957..526037bc6 100644 --- a/bittensor_cli/src/commands/subnets/subnets.py +++ b/bittensor_cli/src/commands/subnets/subnets.py @@ -1838,7 +1838,7 @@ async def register( if not await subtensor.subnet_exists(netuid=netuid, block_hash=block_hash): err_console.print(f"[red]Subnet {netuid} does not exist[/red]") if json_output: - json_console.print( + json_console.print_json( data={ "success": False, "msg": f"Subnet {netuid} does not exist", diff --git a/tests/e2e_tests/test_axon.py b/tests/e2e_tests/test_axon.py index 20763b917..ea3604110 100644 --- a/tests/e2e_tests/test_axon.py +++ b/tests/e2e_tests/test_axon.py @@ -67,9 +67,12 @@ def test_axon_reset_and_set(local_chain, wallet_setup): "--additional-info", "Axon test subnet", "--no-prompt", + "--no-mev-protection", ], ) - assert result.exit_code == 0, f"Subnet creation failed: {result.stdout}" + assert f"Registered subnetwork with netuid: {netuid}" in result.stdout, ( + f"Subnet creation failed: {result.stdout}|{result.stderr}" + ) # Register neuron on the subnet result = exec_command_alice( @@ -282,9 +285,12 @@ def test_axon_set_with_ipv6(local_chain, wallet_setup): "--additional-info", "IPv6 test subnet", "--no-prompt", + "--no-mev-protection", ], ) - assert result.exit_code == 0, f"Subnet creation failed: {result.stdout}" + assert f"Registered subnetwork with netuid: {netuid}" in result.stdout, ( + f"Subnet creation failed: {result.stdout}|{result.stderr}" + ) # Register neuron on the subnet result = exec_command_bob( @@ -413,6 +419,7 @@ def test_axon_set_invalid_inputs(local_chain, wallet_setup): "--additional-info", "Invalid inputs test subnet", "--no-prompt", + "--no-mev-protection", ], ) assert result.exit_code == 0