Skip to content

Commit 7c9951c

Browse files
author
Roman
committed
fix e2e tests
1 parent c493c19 commit 7c9951c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tests/e2e_tests/test_set_subnet_identity_extrinsic.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,24 @@ async def test_set_subnet_identity_extrinsic_happy_pass(subtensor, alice_wallet)
1818
# Verify subnet <netuid> created successfully
1919
assert subtensor.subnet_exists(netuid), "Subnet wasn't created successfully"
2020

21-
# make sure subnet_identity is empty
21+
# Make sure subnet_identity is empty
2222
assert subtensor.subnet(netuid).subnet_identity is None, (
2323
"Subnet identity should be None before set"
2424
)
2525

26-
# prepare SubnetIdentity for subnet
26+
# Prepare SubnetIdentity for subnet
2727
subnet_identity = SubnetIdentity(
2828
subnet_name="e2e test subnet",
2929
github_repo="e2e test repo",
3030
subnet_contact="e2e test contact",
3131
subnet_url="e2e test url",
32+
logo_url="e2e test logo url",
3233
discord="e2e test discord",
3334
description="e2e test description",
3435
additional="e2e test additional",
3536
)
3637

37-
# set SubnetIdentity to subnet
38+
# Set SubnetIdentity to subnet
3839
assert (
3940
subtensor.set_subnet_identity(
4041
wallet=alice_wallet,
@@ -44,7 +45,7 @@ async def test_set_subnet_identity_extrinsic_happy_pass(subtensor, alice_wallet)
4445
is True
4546
), "Set subnet identity failed"
4647

47-
# check SubnetIdentity of the subnet
48+
# Check SubnetIdentity of the subnet
4849
assert subtensor.subnet(netuid).subnet_identity == subnet_identity
4950

5051

@@ -69,31 +70,32 @@ async def test_set_subnet_identity_extrinsic_failed(
6970
"[magenta]Testing `set_subnet_identity_extrinsic` with failed result.[/magenta]"
7071
)
7172

72-
netuid = 2
73+
netuid = subtensor.get_total_subnets() # 2
7374

7475
# Register a subnet, netuid 2
7576
assert subtensor.register_subnet(alice_wallet), "Subnet wasn't created"
7677

7778
# Verify subnet <netuid> created successfully
7879
assert subtensor.subnet_exists(netuid), "Subnet wasn't created successfully"
7980

80-
# make sure subnet_identity is empty
81+
# Make sure subnet_identity is empty
8182
assert subtensor.subnet(netuid).subnet_identity is None, (
8283
"Subnet identity should be None before set"
8384
)
8485

85-
# prepare SubnetIdentity for subnet
86+
# Prepare SubnetIdentity for subnet
8687
subnet_identity = SubnetIdentity(
8788
subnet_name="e2e test subnet",
8889
github_repo="e2e test repo",
8990
subnet_contact="e2e test contact",
9091
subnet_url="e2e test url",
92+
logo_url="e2e test logo url",
9193
discord="e2e test discord",
9294
description="e2e test description",
9395
additional="e2e test additional",
9496
)
9597

96-
# set SubnetIdentity to subnet
98+
# Set SubnetIdentity to subnet with wrong wallet
9799
assert (
98100
subtensor.set_subnet_identity(
99101
wallet=bob_wallet,

0 commit comments

Comments
 (0)