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,13 +4273,14 @@ 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)
type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': False}) if exchange_name != 'binance':
exchange = get_patched_exchange(mocker, default_conf, api_mock) # FUTURES has.fetchLeverageTiers == False
assert exchange.load_leverage_tiers() == {} type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': False})
exchange = get_patched_exchange(mocker, default_conf, api_mock, id=exchange_name)
assert exchange.load_leverage_tiers() == {}
# FUTURES regular # FUTURES regular
type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': True}) type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': True})