Add no-arg test

This commit is contained in:
Matthias
2019-11-12 13:33:37 +01:00
parent b36a1d3260
commit 65489c894d
3 changed files with 12 additions and 6 deletions

View File

@@ -469,7 +469,6 @@ def test_start_new_strategy(mocker, caplog):
assert log_has_re("Writing strategy to .*", caplog)
def test_start_new_strategy_DefaultStrat(mocker, caplog):
args = [
"new-strategy",
@@ -481,6 +480,15 @@ def test_start_new_strategy_DefaultStrat(mocker, caplog):
start_new_strategy(get_args(args))
def test_start_new_strategy_no_arg(mocker, caplog):
args = [
"new-strategy",
]
with pytest.raises(OperationalException,
match="`new-strategy` requires --strategy to be set."):
start_new_strategy(get_args(args))
def test_download_data_keyboardInterrupt(mocker, caplog, markets):
dl_mock = mocker.patch('freqtrade.utils.refresh_backtest_ohlcv_data',
MagicMock(side_effect=KeyboardInterrupt))