Skip to content

Commit

Permalink
Merge branch 'staging' into fix/thewhaleking/ensure-msg-is-str
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheem-opentensor authored Aug 7, 2024
2 parents dd1f84e + 0c4032e commit 69c63ef
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/e2e_tests/subcommands/subnet/test_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import bittensor
from bittensor.commands import RegisterSubnetworkCommand
from tests.e2e_tests.utils import setup_wallet

"""
Test the list command before and after registering subnets.
Verify that:
* list of subnets gets displayed
-------------------------
* Register a subnets
* Ensure is visible in list cmd
"""


def test_list_command(local_chain, capsys):
# Register root as Alice
keypair, exec_command, wallet = setup_wallet("//Alice")

netuid = 0

assert local_chain.query("SubtensorModule", "NetworksAdded", [netuid]).serialize()

exec_command(RegisterSubnetworkCommand, ["s", "create"])

netuid - 1

# Verify subnet 1 created successfully
assert local_chain.query("SubtensorModule", "NetworksAdded", [netuid]).serialize()

0 comments on commit 69c63ef

Please sign in to comment.