Update some missing mocks
This commit is contained in:
parent
b98297786c
commit
bc855b2a32
@ -593,6 +593,7 @@ def test_get_maintenance_ratio_and_amt_binance(
|
|||||||
mm_ratio,
|
mm_ratio,
|
||||||
amt,
|
amt,
|
||||||
):
|
):
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange.exchange_has', return_value=True)
|
||||||
exchange = get_patched_exchange(mocker, default_conf, id="binance")
|
exchange = get_patched_exchange(mocker, default_conf, id="binance")
|
||||||
exchange._leverage_tiers = leverage_tiers
|
exchange._leverage_tiers = leverage_tiers
|
||||||
(result_ratio, result_amt) = exchange.get_maintenance_ratio_and_amt(pair, nominal_value)
|
(result_ratio, result_amt) = exchange.get_maintenance_ratio_and_amt(pair, nominal_value)
|
||||||
|
@ -4311,6 +4311,7 @@ def test_get_maintenance_ratio_and_amt_exceptions(mocker, default_conf, leverage
|
|||||||
api_mock = MagicMock()
|
api_mock = MagicMock()
|
||||||
default_conf['trading_mode'] = 'futures'
|
default_conf['trading_mode'] = 'futures'
|
||||||
default_conf['margin_mode'] = 'isolated'
|
default_conf['margin_mode'] = 'isolated'
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange.exchange_has', return_value=True)
|
||||||
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||||
|
|
||||||
exchange._leverage_tiers = leverage_tiers
|
exchange._leverage_tiers = leverage_tiers
|
||||||
@ -4347,6 +4348,7 @@ def test_get_maintenance_ratio_and_amt(
|
|||||||
api_mock = MagicMock()
|
api_mock = MagicMock()
|
||||||
default_conf['trading_mode'] = 'futures'
|
default_conf['trading_mode'] = 'futures'
|
||||||
default_conf['margin_mode'] = 'isolated'
|
default_conf['margin_mode'] = 'isolated'
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange.exchange_has', return_value=True)
|
||||||
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||||
exchange.get_maintenance_ratio_and_amt(pair, value) == (mmr, maintAmt)
|
exchange.get_maintenance_ratio_and_amt(pair, value) == (mmr, maintAmt)
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ def test_get_maintenance_ratio_and_amt_okx(
|
|||||||
default_conf['dry_run'] = False
|
default_conf['dry_run'] = False
|
||||||
mocker.patch.multiple(
|
mocker.patch.multiple(
|
||||||
'freqtrade.exchange.Okx',
|
'freqtrade.exchange.Okx',
|
||||||
|
exchange_has=MagicMock(return_value=True),
|
||||||
load_leverage_tiers=MagicMock(return_value={
|
load_leverage_tiers=MagicMock(return_value={
|
||||||
'ETH/USDT:USDT': [
|
'ETH/USDT:USDT': [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user