Update more exchange mocks to use EXMS

This commit is contained in:
Matthias
2023-03-01 20:14:15 +01:00
parent bcdf4e0fe8
commit 2ca8b0b12e
11 changed files with 196 additions and 196 deletions

View File

@@ -58,7 +58,7 @@ def test_may_execute_exit_stoploss_on_exchange_multi(default_conf, ticker, fee,
cancel_order_mock = MagicMock()
mocker.patch('freqtrade.exchange.binance.Binance.create_stoploss', stoploss)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
fetch_ticker=ticker,
get_fee=fee,
amount_to_precision=lambda s, x, y: y,
@@ -147,7 +147,7 @@ def test_forcebuy_last_unlimited(default_conf, ticker, fee, mocker, balance_rati
default_conf['telegram']['enabled'] = True
mocker.patch('freqtrade.rpc.telegram.Telegram', MagicMock())
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
fetch_ticker=ticker,
get_fee=fee,
amount_to_precision=lambda s, x, y: y,
@@ -217,7 +217,7 @@ def test_dca_buying(default_conf_usdt, ticker_usdt, fee, mocker) -> None:
freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
fetch_ticker=ticker_usdt,
get_fee=fee,
)
@@ -286,7 +286,7 @@ def test_dca_short(default_conf_usdt, ticker_usdt, fee, mocker) -> None:
freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
fetch_ticker=ticker_usdt,
get_fee=fee,
amount_to_precision=lambda s, x, y: round(y, 4),
@@ -361,7 +361,7 @@ def test_dca_order_adjust(default_conf_usdt, ticker_usdt, leverage, fee, mocker)
freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt)
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
fetch_ticker=ticker_usdt,
get_fee=fee,
amount_to_precision=lambda s, x, y: y,
@@ -477,7 +477,7 @@ def test_dca_exiting(default_conf_usdt, ticker_usdt, fee, mocker, caplog, levera
freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt)
freqtrade.trading_mode = TradingMode.FUTURES
mocker.patch.multiple(
'freqtrade.exchange.Exchange',
EXMS,
fetch_ticker=ticker_usdt,
get_fee=fee,
amount_to_precision=lambda s, x, y: y,