Skip to content

Commit

Permalink
fix: properly mock data_chain class methods
Browse files Browse the repository at this point in the history
  • Loading branch information
zyzniewski-reef committed Feb 26, 2025
1 parent 46c6f62 commit 7b23a26
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit_tests/test_async_subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,10 @@ async def test_get_delegates(subtensor, mocker, fake_result, response):
autospec=subtensor.query_runtime_api, return_value=fake_result
)
subtensor.query_runtime_api = mocked_query_runtime_api
mocked_delegate_info_list_from_dicts = mocker.Mock()
async_subtensor.DelegateInfo.list_from_dicts = mocked_delegate_info_list_from_dicts
mocked_delegate_info_list_from_dicts = mocker.patch.object(
async_subtensor.DelegateInfo,
"list_from_dicts",
)

# Call
result = await subtensor.get_delegates(block_hash=None, reuse_block=False)
Expand Down

0 comments on commit 7b23a26

Please sign in to comment.