From 6c0a1fc42cd279c0d7f4293b9e7fbe5d8919ae5b Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 24 Sep 2019 11:07:12 +0200 Subject: [PATCH] Fix tests that fail when config.json is present --- tests/test_utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index dc0badd01..c99044610 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -117,12 +117,15 @@ def test_download_data_no_exchange(mocker, caplog): args = [ "download-data", ] + pargs = get_args(args) + pargs['config'] = None with pytest.raises(OperationalException, match=r"This command requires a configured exchange.*"): - start_download_data(get_args(args)) + start_download_data(pargs) def test_download_data_no_pairs(mocker, caplog): + mocker.patch.object(Path, "exists", MagicMock(return_value=False)) mocker.patch('freqtrade.utils.refresh_backtest_ohlcv_data', @@ -136,6 +139,8 @@ def test_download_data_no_pairs(mocker, caplog): "--exchange", "binance", ] + pargs = get_args(args) + pargs['config'] = None with pytest.raises(OperationalException, match=r"Downloading data requires a list of pairs\..*"): - start_download_data(get_args(args)) + start_download_data(pargs)