From 24aa6a1679d63c0409b0de922afb3e8afa13fbb2 Mon Sep 17 00:00:00 2001 From: gcarq Date: Thu, 29 Mar 2018 20:17:11 +0200 Subject: [PATCH] adapt test_download_backtesting_testdata --- freqtrade/tests/optimize/test_optimize.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/freqtrade/tests/optimize/test_optimize.py b/freqtrade/tests/optimize/test_optimize.py index e26d30534..a15bff5a1 100644 --- a/freqtrade/tests/optimize/test_optimize.py +++ b/freqtrade/tests/optimize/test_optimize.py @@ -182,10 +182,11 @@ def test_download_backtesting_testdata(ticker_history, mocker) -> None: def test_download_backtesting_testdata2(mocker) -> None: tick = [{'T': 'bar'}, {'T': 'foo'}] - mocker.patch('freqtrade.misc.file_dump_json', return_value=None) + json_dump_mock = mocker.patch('freqtrade.misc.file_dump_json', return_value=None) mocker.patch('freqtrade.optimize.__init__.get_ticker_history', return_value=tick) - assert download_backtesting_testdata(None, pair="BTC-UNITEST", interval=1) - assert download_backtesting_testdata(None, pair="BTC-UNITEST", interval=3) + download_backtesting_testdata(None, pair="BTC-UNITEST", interval=1) + download_backtesting_testdata(None, pair="BTC-UNITEST", interval=3) + assert json_dump_mock.call_count == 2 def test_load_tickerdata_file() -> None: