Skip to content

Commit d21e07e

Browse files
committed
improve tests regardless last logic changes
1 parent 20e2dc5 commit d21e07e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/e2e_tests/test_staking.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,15 +1102,18 @@ def test_auto_staking(subtensor, alice_wallet, bob_wallet, eve_wallet):
11021102
alice_subnet_netuid: bob_wallet.hotkey.ss58_address
11031103
}
11041104

1105-
# set auto stake to another hotkey
1106-
assert subtensor.staking.set_auto_stake(
1105+
# set auto stake to nonexistent hotkey
1106+
success, message = subtensor.staking.set_auto_stake(
11071107
wallet=alice_wallet,
11081108
netuid=alice_subnet_netuid,
11091109
hotkey_ss58=eve_wallet.hotkey.ss58_address,
11101110
)
1111+
assert success is False
1112+
assert "HotKeyNotRegisteredInSubNet" in message
1113+
11111114
# check auto stake
11121115
assert subtensor.staking.get_auto_stakes(alice_wallet.coldkey.ss58_address) == {
1113-
alice_subnet_netuid: eve_wallet.hotkey.ss58_address
1116+
alice_subnet_netuid: bob_wallet.hotkey.ss58_address
11141117
}
11151118

11161119
logging.console.success(f"Test `test_auto_staking` passed.")

0 commit comments

Comments
 (0)