test: use ft_additional_exchange_init in tests
This commit is contained in:
@@ -170,7 +170,7 @@ def test_init(default_conf, mocker, caplog):
|
|||||||
def test_init_ccxt_kwargs(default_conf, mocker, caplog):
|
def test_init_ccxt_kwargs(default_conf, mocker, caplog):
|
||||||
mocker.patch(f"{EXMS}.reload_markets")
|
mocker.patch(f"{EXMS}.reload_markets")
|
||||||
mocker.patch(f"{EXMS}.validate_stakecurrency")
|
mocker.patch(f"{EXMS}.validate_stakecurrency")
|
||||||
aei_mock = mocker.patch(f"{EXMS}.additional_exchange_init")
|
aei_mock = mocker.patch(f"{EXMS}.ft_additional_exchange_init")
|
||||||
|
|
||||||
caplog.set_level(logging.INFO)
|
caplog.set_level(logging.INFO)
|
||||||
conf = copy.deepcopy(default_conf)
|
conf = copy.deepcopy(default_conf)
|
||||||
|
|||||||
@@ -581,10 +581,7 @@ def get_futures_exchange(exchange_name, exchange_conf, class_mocker):
|
|||||||
|
|
||||||
class_mocker.patch("freqtrade.exchange.binance.Binance.fill_leverage_tiers")
|
class_mocker.patch("freqtrade.exchange.binance.Binance.fill_leverage_tiers")
|
||||||
class_mocker.patch(f"{EXMS}.fetch_trading_fees")
|
class_mocker.patch(f"{EXMS}.fetch_trading_fees")
|
||||||
class_mocker.patch("freqtrade.exchange.okx.Okx.additional_exchange_init")
|
class_mocker.patch(f"{EXMS}.ft_additional_exchange_init")
|
||||||
class_mocker.patch("freqtrade.exchange.binance.Binance.additional_exchange_init")
|
|
||||||
class_mocker.patch("freqtrade.exchange.bybit.Bybit.additional_exchange_init")
|
|
||||||
class_mocker.patch("freqtrade.exchange.gate.Gate.additional_exchange_init")
|
|
||||||
class_mocker.patch(f"{EXMS}.load_cached_leverage_tiers", return_value=None)
|
class_mocker.patch(f"{EXMS}.load_cached_leverage_tiers", return_value=None)
|
||||||
class_mocker.patch(f"{EXMS}.cache_leverage_tiers")
|
class_mocker.patch(f"{EXMS}.cache_leverage_tiers")
|
||||||
|
|
||||||
@@ -593,7 +590,7 @@ def get_futures_exchange(exchange_name, exchange_conf, class_mocker):
|
|||||||
|
|
||||||
@pytest.fixture(params=EXCHANGES, scope="class")
|
@pytest.fixture(params=EXCHANGES, scope="class")
|
||||||
def exchange(request, exchange_conf, class_mocker):
|
def exchange(request, exchange_conf, class_mocker):
|
||||||
class_mocker.patch("freqtrade.exchange.bybit.Bybit.additional_exchange_init")
|
class_mocker.patch(f"{EXMS}.ft_additional_exchange_init")
|
||||||
exchange, name = get_exchange(request.param, exchange_conf)
|
exchange, name = get_exchange(request.param, exchange_conf)
|
||||||
yield exchange, name
|
yield exchange, name
|
||||||
exchange.close()
|
exchange.close()
|
||||||
|
|||||||
Reference in New Issue
Block a user