chore: update patch_exchange to not override builtins

This commit is contained in:
Matthias
2024-07-05 09:10:55 +02:00
parent 1e287de589
commit 36a44575c7
5 changed files with 18 additions and 17 deletions

View File

@@ -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(

View File

@@ -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(