Skip to content

Commit 46db5b2

Browse files
committed
Fix tests
1 parent 9dc1b99 commit 46db5b2

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

bittensor_cli/src/commands/stake/add.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ async def safe_stake_extrinsic(
8888
},
8989
)
9090
extrinsic = await subtensor.substrate.create_signed_extrinsic(
91-
call=call, keypair=wallet.coldkey, nonce=next_nonce, era={"period": era}
91+
call=call,
92+
keypair=wallet.coldkey,
93+
nonce=next_nonce,
94+
era={"period": era},
9295
)
9396
try:
9497
response = await subtensor.substrate.submit_extrinsic(

tests/e2e_tests/test_staking_sudo.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ def test_staking(local_chain, wallet_setup):
112112
"0.1",
113113
"--partial",
114114
"--no-prompt",
115+
"--era",
116+
"144",
115117
],
116118
)
117-
assert "✅ Finalized" in add_stake.stdout
119+
assert "✅ Finalized" in add_stake.stdout, add_stake.stderr
118120

119121
# Execute stake show for Alice's wallet
120122
show_stake = exec_command_alice(
@@ -157,6 +159,8 @@ def test_staking(local_chain, wallet_setup):
157159
"0.1",
158160
"--partial",
159161
"--no-prompt",
162+
"--era",
163+
"144",
160164
],
161165
)
162166
assert "✅ Finalized" in remove_stake.stdout

tests/e2e_tests/test_unstaking.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ def test_unstaking(local_chain, wallet_setup):
139139
"--partial",
140140
"--tolerance",
141141
"0.5",
142+
"--era",
143+
"144",
142144
],
143145
)
144146
assert "✅ Finalized" in stake_result.stdout
@@ -184,6 +186,8 @@ def test_unstaking(local_chain, wallet_setup):
184186
"--partial",
185187
"--tolerance",
186188
"0.5",
189+
"--era",
190+
"144",
187191
],
188192
)
189193
assert "✅ Finalized" in partial_unstake_netuid_2.stdout
@@ -229,6 +233,8 @@ def test_unstaking(local_chain, wallet_setup):
229233
"--all-alpha",
230234
"--no-prompt",
231235
"--verbose",
236+
"--era",
237+
"144",
232238
],
233239
)
234240

@@ -258,6 +264,8 @@ def test_unstaking(local_chain, wallet_setup):
258264
"--partial",
259265
"--tolerance",
260266
"0.5",
267+
"--era",
268+
"144",
261269
],
262270
)
263271
assert "✅ Finalized" in stake_result.stdout
@@ -277,6 +285,8 @@ def test_unstaking(local_chain, wallet_setup):
277285
"ws://127.0.0.1:9945",
278286
"--all",
279287
"--no-prompt",
288+
"--era",
289+
"144",
280290
],
281291
)
282292
assert "✅ Finalized: Successfully unstaked all stakes from" in unstake_all.stdout

tests/e2e_tests/test_wallet_interactions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ def test_wallet_transfer(local_chain, wallet_setup):
245245
"--amount",
246246
"100",
247247
"--no-prompt",
248+
"--era",
249+
"144",
248250
],
249251
)
250252

0 commit comments

Comments
 (0)