Skip to content

Commit 59ab51c

Browse files
committed
test: Update basic test for calls to parallel-download
1 parent 2eb2617 commit 59ab51c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/data/test_history.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,9 @@ def test_refresh_backtest_ohlcv_data(
544544
):
545545
caplog.set_level(logging.DEBUG)
546546
dl_mock = mocker.patch("freqtrade.data.history.history_utils._download_pair_history")
547+
parallel_mock = mocker.patch(
548+
"freqtrade.data.history.history_utils._download_all_pairs_history_parallel", return_value={}
549+
)
547550
mocker.patch(f"{EXMS}.markets", PropertyMock(return_value=markets))
548551

549552
mocker.patch.object(Path, "exists", MagicMock(return_value=True))
@@ -558,10 +561,12 @@ def test_refresh_backtest_ohlcv_data(
558561
timeframes=["1m", "5m"],
559562
datadir=testdatadir,
560563
timerange=timerange,
561-
erase=True,
564+
erase=False,
562565
trading_mode=trademode,
563566
)
564567

568+
# Called once per timeframe and pair
569+
assert parallel_mock.call_count == 4
565570
assert dl_mock.call_count == callcount
566571
assert dl_mock.call_args[1]["timerange"].starttype == "date"
567572

0 commit comments

Comments
 (0)