File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 4
4
"""
5
5
6
6
import asyncio
7
- import unittest .mock
8
7
from typing import Union , Optional , TYPE_CHECKING
9
8
9
+ from bittensor .utils .balance import Balance
10
10
from bittensor .utils .btlogging import logging
11
11
12
12
# for typing purposes
16
16
from async_substrate_interface import SubstrateInterface , ExtrinsicReceipt
17
17
18
18
19
- ANY_BALANCE = unittest .mock .Mock (
20
- rao = unittest .mock .ANY ,
21
- unit = unittest .mock .ANY ,
22
- )
19
+ def get_dynamic_balance (rao : int , netuid : int = 0 ):
20
+ """Returns a Balance object with the given rao and netuid for testing purposes with synamic values."""
21
+ return Balance (rao ).set_unit (netuid )
23
22
24
23
25
24
def sudo_set_hyperparameter_bool (
@@ -198,7 +197,7 @@ async def root_set_subtensor_hyperparameter_values(
198
197
call_function : str ,
199
198
call_params : dict ,
200
199
return_error_message : bool = False ,
201
- ) -> tuple [bool , str ]:
200
+ ) -> tuple [bool , Optional [ dict ] ]:
202
201
"""
203
202
Sets liquid alpha values using AdminUtils. Mimics setting hyperparams
204
203
"""
@@ -218,7 +217,7 @@ async def root_set_subtensor_hyperparameter_values(
218
217
if return_error_message :
219
218
return response .is_success , response .error_message
220
219
221
- return response .is_success , ""
220
+ return response .is_success , None
222
221
223
222
224
223
def set_identity (
You can’t perform that action at this time.
0 commit comments