Skip to content

Commit e90c412

Browse files
author
Roman
committed
fix unit tests
1 parent d3ed298 commit e90c412

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

tests/unit_tests/extrinsics/asyncex/test_commit_reveal.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ async def test_do_commit_reveal_v3_success(mocker, subtensor, fake_wallet):
7373
# Asserts
7474
mocked_compose_call.assert_awaited_once_with(
7575
call_module="SubtensorModule",
76-
call_function="commit_crv3_weights",
76+
call_function="commit_timelocked_weights",
7777
call_params={
7878
"netuid": fake_netuid,
7979
"commit": fake_commit,
8080
"reveal_round": fake_reveal_round,
81+
"commit_reveal_version": 4,
8182
},
8283
)
8384
mocked_create_signed_extrinsic.assert_awaited_once_with(
@@ -132,11 +133,12 @@ async def test_do_commit_reveal_v3_failure_due_to_error(mocker, subtensor, fake_
132133
# Asserts
133134
mocked_compose_call.assert_awaited_once_with(
134135
call_module="SubtensorModule",
135-
call_function="commit_crv3_weights",
136+
call_function="commit_timelocked_weights",
136137
call_params={
137138
"netuid": fake_netuid,
138139
"commit": fake_commit,
139140
"reveal_round": fake_reveal_round,
141+
"commit_reveal_version": 4,
140142
},
141143
)
142144
mocked_create_signed_extrinsic.assert_awaited_once_with(
@@ -220,7 +222,7 @@ async def test_commit_reveal_v3_extrinsic_success_with_torch(
220222
netuid=fake_netuid,
221223
current_block=mock_block.return_value["header"]["number"],
222224
block_time=12.0,
223-
hotkey=fake_wallet.hotkey.ss58_address.encode(),
225+
hotkey=fake_wallet.hotkey.public_key,
224226
)
225227
mock_do_commit_reveal_v3.assert_awaited_once_with(
226228
subtensor=subtensor,

tests/unit_tests/extrinsics/test_commit_reveal.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ def test_do_commit_reveal_v3_success(mocker, subtensor, fake_wallet):
7070
# Asserts
7171
mocked_compose_call.assert_called_once_with(
7272
call_module="SubtensorModule",
73-
call_function="commit_crv3_weights",
73+
call_function="commit_timelocked_weights",
7474
call_params={
7575
"netuid": fake_netuid,
7676
"commit": fake_commit,
7777
"reveal_round": fake_reveal_round,
78+
"commit_reveal_version": 4,
7879
},
7980
)
8081
mocked_sign_and_send_extrinsic.assert_called_once_with(
@@ -123,11 +124,12 @@ def test_do_commit_reveal_v3_failure_due_to_error(mocker, subtensor, fake_wallet
123124
# Asserts
124125
mocked_compose_call.assert_called_once_with(
125126
call_module="SubtensorModule",
126-
call_function="commit_crv3_weights",
127+
call_function="commit_timelocked_weights",
127128
call_params={
128129
"netuid": fake_netuid,
129130
"commit": fake_commit,
130131
"reveal_round": fake_reveal_round,
132+
"commit_reveal_version": 4,
131133
},
132134
)
133135
mocked_create_signed_extrinsic.assert_called_once_with(
@@ -205,7 +207,7 @@ def test_commit_reveal_v3_extrinsic_success_with_torch(
205207
netuid=fake_netuid,
206208
current_block=mock_block.return_value,
207209
block_time=12.0,
208-
hotkey=fake_wallet.hotkey.ss58_address.encode(),
210+
hotkey=fake_wallet.hotkey.public_key,
209211
)
210212
mock_do_commit_reveal_v3.assert_called_once_with(
211213
subtensor=subtensor,

0 commit comments

Comments
 (0)