Skip to content

Commit 4e9185e

Browse files
committed
fix unit tests
1 parent d5beb73 commit 4e9185e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

tests/unit_tests/extrinsics/asyncex/test_mev_shield.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async def test_wait_for_extrinsic_by_hash_success(subtensor, mocker):
1515
shield_id = "shield_id_123"
1616
submit_block_hash = "0xblockhash"
1717
starting_block = 100
18-
current_block = 101
18+
current_block = 100
1919

2020
mocked_get_block_number = mocker.patch.object(
2121
subtensor.substrate,
@@ -76,7 +76,7 @@ async def test_wait_for_extrinsic_by_hash_decryption_failed(subtensor, mocker):
7676
shield_id = "shield_id_123"
7777
submit_block_hash = "0xblockhash"
7878
starting_block = 100
79-
current_block = 101
79+
current_block = 100
8080

8181
mocked_get_block_number = mocker.patch.object(
8282
subtensor.substrate,
@@ -174,9 +174,9 @@ async def test_wait_for_extrinsic_by_hash_timeout(subtensor, mocker):
174174

175175
# Asserts
176176
mocked_get_block_number.assert_awaited_once_with(submit_block_hash)
177-
assert mocked_wait_for_block.await_count == 3
178-
assert mocked_get_block_hash.await_count == 3
179-
assert mocked_get_extrinsics.await_count == 3
177+
assert mocked_wait_for_block.await_count == 4
178+
assert mocked_get_block_hash.await_count == 4
179+
assert mocked_get_extrinsics.await_count == 4
180180
assert result is None
181181

182182

tests/unit_tests/extrinsics/test_mev_shield.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_wait_for_extrinsic_by_hash_success(subtensor, mocker):
1313
shield_id = "shield_id_123"
1414
submit_block_hash = "0xblockhash"
1515
starting_block = 100
16-
current_block = 101
16+
current_block = 100
1717

1818
mocked_get_block_number = mocker.patch.object(
1919
subtensor.substrate, "get_block_number", return_value=starting_block
@@ -67,7 +67,7 @@ def test_wait_for_extrinsic_by_hash_decryption_failed(subtensor, mocker):
6767
shield_id = "shield_id_123"
6868
submit_block_hash = "0xblockhash"
6969
starting_block = 100
70-
current_block = 101
70+
current_block = 100
7171

7272
mocked_get_block_number = mocker.patch.object(
7373
subtensor.substrate, "get_block_number", return_value=starting_block
@@ -152,9 +152,9 @@ def test_wait_for_extrinsic_by_hash_timeout(subtensor, mocker):
152152

153153
# Asserts
154154
mocked_get_block_number.assert_called_once_with(submit_block_hash)
155-
assert mocked_wait_for_block.call_count == 3
156-
assert mocked_get_block_hash.call_count == 3
157-
assert mocked_get_extrinsics.call_count == 3
155+
assert mocked_wait_for_block.call_count == 4
156+
assert mocked_get_block_hash.call_count == 4
157+
assert mocked_get_extrinsics.call_count == 4
158158
assert result is None
159159

160160

0 commit comments

Comments
 (0)