File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
1
+ import json
1
2
import re
2
3
3
4
from bittensor_cli .src .bittensor .balances import Balance
@@ -217,6 +218,25 @@ def test_unstaking(local_chain, wallet_setup):
217
218
float (inital_stake_netuid_2 )
218
219
)
219
220
221
+ show_stake_json = exec_command_alice (
222
+ command = "stake" ,
223
+ sub_command = "list" ,
224
+ extra_args = [
225
+ "--wallet-path" ,
226
+ wallet_path_bob ,
227
+ "--wallet-name" ,
228
+ wallet_bob .name ,
229
+ "--chain" ,
230
+ "ws://127.0.0.1:9945" ,
231
+ "--json-output" ,
232
+ ],
233
+ )
234
+ show_stake_json_output = json .loads (show_stake_json .stdout )
235
+ bob_stake = show_stake_json_output ["stake_info" ][keypair_bob .ss58_address ]
236
+ assert Balance .from_tao (
237
+ next (filter (lambda x : x ["netuid" ] == 2 , bob_stake ))["stake_value" ]
238
+ ) <= Balance .from_tao (float (inital_stake_netuid_2 ))
239
+
220
240
# Remove all alpha stakes
221
241
unstake_alpha = exec_command_bob (
222
242
command = "stake" ,
You can’t perform that action at this time.
0 commit comments