Merge pull request #2298 from freqtrade/fix/failing_tests

[minor] Fix tests that fail when config.json is present
This commit is contained in:
hroff-1902 2019-09-24 21:19:45 +03:00 committed by GitHub
commit 2d86510acf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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