@@ -1583,9 +1583,6 @@ async def test_does_hotkey_exist_true(subtensor, mocker):
15831583 mocked_query = mocker .AsyncMock (value = fake_query_result )
15841584 subtensor .substrate .query = mocked_query
15851585
1586- mocked_decode_account_id = mocker .Mock (return_value = "another_account_id" )
1587- mocker .patch .object (async_subtensor , "decode_account_id" , mocked_decode_account_id )
1588-
15891586 # Call
15901587 result = await subtensor .does_hotkey_exist (
15911588 hotkey_ss58 = fake_hotkey_ss58 , block_hash = fake_block_hash
@@ -1599,25 +1596,19 @@ async def test_does_hotkey_exist_true(subtensor, mocker):
15991596 block_hash = fake_block_hash ,
16001597 reuse_block_hash = False ,
16011598 )
1602- mocked_decode_account_id .assert_called_once ()
16031599 assert result is True
16041600
16051601
16061602@pytest .mark .asyncio
16071603async def test_does_hotkey_exist_false_for_specific_account (subtensor , mocker ):
16081604 """Tests does_hotkey_exist method when the hotkey exists but matches the specific account ID to ignore."""
16091605 # Preps
1610- fake_hotkey_ss58 = "ignored_hotkey "
1611- fake_query_result = [ "ignored_account_id" ]
1606+ fake_hotkey_ss58 = "fake_hotkey "
1607+ fake_query_result = "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM"
16121608
1613- mocked_query = mocker .AsyncMock (value = fake_query_result )
1614- subtensor .substrate .query = mocked_query
1615-
1616- # Mock the decode_account_id function to return the specific account ID that should be ignored
1617- mocked_decode_account_id = mocker .Mock (
1618- return_value = "5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM"
1609+ mocked_query = mocker .patch .object (
1610+ subtensor .substrate , "query" , return_value = fake_query_result
16191611 )
1620- mocker .patch .object (async_subtensor , "decode_account_id" , mocked_decode_account_id )
16211612
16221613 # Call
16231614 result = await subtensor .does_hotkey_exist (hotkey_ss58 = fake_hotkey_ss58 )
@@ -1630,7 +1621,6 @@ async def test_does_hotkey_exist_false_for_specific_account(subtensor, mocker):
16301621 block_hash = None ,
16311622 reuse_block_hash = False ,
16321623 )
1633- mocked_decode_account_id .assert_called_once ()
16341624 assert result is False
16351625
16361626
0 commit comments