Skip to content

Commit

Permalink
Fix tests that fail when config.json is present
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Sep 24, 2019
1 parent d066ab2 commit 6c0a1fc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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)

0 comments on commit 6c0a1fc

Please sign in to comment.