Humanize show-trades error when no database is specified

This commit is contained in:
Matthias
2020-05-05 19:48:28 +02:00
parent 1b448f57b9
commit ffef4bc474
2 changed files with 13 additions and 0 deletions

View File

@@ -1077,3 +1077,11 @@ def test_show_trades(mocker, fee, capsys, caplog):
assert '"trade_id": 1' in captured.out
assert '"trade_id": 2' in captured.out
assert '"trade_id": 3' not in captured.out
args = [
"show-trades",
]
pargs = get_args(args)
pargs['config'] = None
with pytest.raises(OperationalException, match=r"--db-url is required for this command."):
start_show_trades(pargs)