fixed tests
This commit is contained in:
parent
3fe0e13bb1
commit
1f3d3d87f6
@ -3500,11 +3500,10 @@ def test_set_margin_mode(mocker, default_conf, margin_mode):
|
|||||||
("okx", TradingMode.FUTURES, MarginMode.CROSS, True),
|
("okx", TradingMode.FUTURES, MarginMode.CROSS, True),
|
||||||
|
|
||||||
("binance", TradingMode.FUTURES, MarginMode.ISOLATED, False),
|
("binance", TradingMode.FUTURES, MarginMode.ISOLATED, False),
|
||||||
# ("gateio", TradingMode.FUTURES, MarginMode.ISOLATED, False),
|
("gateio", TradingMode.FUTURES, MarginMode.ISOLATED, False),
|
||||||
("okx", TradingMode.FUTURES, MarginMode.ISOLATED, False),
|
("okx", TradingMode.FUTURES, MarginMode.ISOLATED, False),
|
||||||
|
|
||||||
# * Remove once implemented
|
# * Remove once implemented
|
||||||
("gateio", TradingMode.FUTURES, MarginMode.ISOLATED, True),
|
|
||||||
("binance", TradingMode.MARGIN, MarginMode.CROSS, True),
|
("binance", TradingMode.MARGIN, MarginMode.CROSS, True),
|
||||||
("binance", TradingMode.FUTURES, MarginMode.CROSS, True),
|
("binance", TradingMode.FUTURES, MarginMode.CROSS, True),
|
||||||
("kraken", TradingMode.MARGIN, MarginMode.CROSS, True),
|
("kraken", TradingMode.MARGIN, MarginMode.CROSS, True),
|
||||||
@ -4274,10 +4273,17 @@ def test_load_leverage_tiers(mocker, default_conf, leverage_tiers):
|
|||||||
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||||
assert exchange.load_leverage_tiers() == {}
|
assert exchange.load_leverage_tiers() == {}
|
||||||
|
|
||||||
# FUTURES
|
# 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)
|
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||||
|
type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': False})
|
||||||
|
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||||
|
assert exchange.load_leverage_tiers() == {}
|
||||||
|
|
||||||
|
# FUTURES regular
|
||||||
|
type(api_mock).has = PropertyMock(return_value={'fetchLeverageTiers': True})
|
||||||
|
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||||
assert exchange.load_leverage_tiers() == {
|
assert exchange.load_leverage_tiers() == {
|
||||||
'ADA/USDT:USDT': [
|
'ADA/USDT:USDT': [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user