mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-20 05:50:36 +00:00
chore: update patch_exchange to not override builtins
This commit is contained in:
@@ -14,7 +14,7 @@ def test_download_data_main_no_markets(mocker, caplog):
|
||||
"freqtrade.data.history.history_utils.refresh_backtest_ohlcv_data",
|
||||
MagicMock(return_value=["ETH/BTC", "XRP/BTC"]),
|
||||
)
|
||||
patch_exchange(mocker, id="binance")
|
||||
patch_exchange(mocker, exchange="binance")
|
||||
mocker.patch(f"{EXMS}.get_markets", return_value={})
|
||||
config = setup_utils_configuration({"exchange": "binance"}, RunMode.UTIL_EXCHANGE)
|
||||
config.update({"days": 20, "pairs": ["ETH/BTC", "XRP/BTC"], "timeframes": ["5m", "1h"]})
|
||||
@@ -91,7 +91,7 @@ def test_download_data_main_trades(mocker):
|
||||
|
||||
|
||||
def test_download_data_main_data_invalid(mocker):
|
||||
patch_exchange(mocker, id="kraken")
|
||||
patch_exchange(mocker, exchange="kraken")
|
||||
mocker.patch(f"{EXMS}.get_markets", return_value={})
|
||||
config = setup_utils_configuration({"exchange": "kraken"}, RunMode.UTIL_EXCHANGE)
|
||||
config.update(
|
||||
|
||||
@@ -17,7 +17,7 @@ def test_import_kraken_trades_from_csv(testdatadir, tmp_path, caplog, default_co
|
||||
|
||||
default_conf_usdt["exchange"]["name"] = "kraken"
|
||||
|
||||
patch_exchange(mocker, id="kraken")
|
||||
patch_exchange(mocker, exchange="kraken")
|
||||
mocker.patch(
|
||||
f"{EXMS}.markets",
|
||||
PropertyMock(
|
||||
|
||||
Reference in New Issue
Block a user