From 2ceaec4e4f53cab13d6b356d8285d32cb1f1f0f8 Mon Sep 17 00:00:00 2001 From: bdhimes Date: Wed, 10 Dec 2025 21:28:12 +0200 Subject: [PATCH 1/2] Corrects `print` to `print_json` for the console (uses data kwarg) --- bittensor_cli/src/commands/subnets/subnets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From af9abffccc43b31757c7c45d5414210ec7ee88ff Mon Sep 17 00:00:00 2001 From: bdhimes Date: Wed, 10 Dec 2025 21:28:23 +0200 Subject: [PATCH 2/2] Fixes axon tests --- tests/e2e_tests/test_axon.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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