fixed test_load_leverage_tiers

This commit is contained in:
Sam Germain 2022-02-16 05:44:11 -06:00
parent c70050e750
commit 6f410d3096

View File

@ -4273,12 +4273,13 @@ def test_load_leverage_tiers(mocker, default_conf, leverage_tiers, exchange_name
exchange = get_patched_exchange(mocker, default_conf, api_mock, id=exchange_name) exchange = get_patched_exchange(mocker, default_conf, api_mock, id=exchange_name)
assert exchange.load_leverage_tiers() == {} assert exchange.load_leverage_tiers() == {}
# FUTURES has.fetchLeverageTiers == False
default_conf['trading_mode'] = 'futures' default_conf['trading_mode'] = 'futures'
default_conf['margin_mode'] = 'isolated' default_conf['margin_mode'] = 'isolated'
exchange = get_patched_exchange(mocker, default_conf, api_mock, id=exchange_name)
if exchange_name != 'binance':
# FUTURES has.fetchLeverageTiers == False
type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': False}) type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': False})
exchange = get_patched_exchange(mocker, default_conf, api_mock) exchange = get_patched_exchange(mocker, default_conf, api_mock, id=exchange_name)
assert exchange.load_leverage_tiers() == {} assert exchange.load_leverage_tiers() == {}
# FUTURES regular # FUTURES regular