Merge pull request #2298 from freqtrade/fix/failing_tests
[minor] Fix tests that fail when config.json is present
This commit is contained in:
commit
2d86510acf
@ -117,12 +117,15 @@ def test_download_data_no_exchange(mocker, caplog):
|
|||||||
args = [
|
args = [
|
||||||
"download-data",
|
"download-data",
|
||||||
]
|
]
|
||||||
|
pargs = get_args(args)
|
||||||
|
pargs['config'] = None
|
||||||
with pytest.raises(OperationalException,
|
with pytest.raises(OperationalException,
|
||||||
match=r"This command requires a configured exchange.*"):
|
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):
|
def test_download_data_no_pairs(mocker, caplog):
|
||||||
|
|
||||||
mocker.patch.object(Path, "exists", MagicMock(return_value=False))
|
mocker.patch.object(Path, "exists", MagicMock(return_value=False))
|
||||||
|
|
||||||
mocker.patch('freqtrade.utils.refresh_backtest_ohlcv_data',
|
mocker.patch('freqtrade.utils.refresh_backtest_ohlcv_data',
|
||||||
@ -136,6 +139,8 @@ def test_download_data_no_pairs(mocker, caplog):
|
|||||||
"--exchange",
|
"--exchange",
|
||||||
"binance",
|
"binance",
|
||||||
]
|
]
|
||||||
|
pargs = get_args(args)
|
||||||
|
pargs['config'] = None
|
||||||
with pytest.raises(OperationalException,
|
with pytest.raises(OperationalException,
|
||||||
match=r"Downloading data requires a list of pairs\..*"):
|
match=r"Downloading data requires a list of pairs\..*"):
|
||||||
start_download_data(get_args(args))
|
start_download_data(pargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user