Fix tests after small updates
This commit is contained in:
parent
36b7edc342
commit
5dfa1807a3
@ -58,7 +58,6 @@ def test__init__(default_conf, mocker) -> None:
|
|||||||
mocker.patch('freqtrade.rpc.telegram.Telegram._init', MagicMock())
|
mocker.patch('freqtrade.rpc.telegram.Telegram._init', MagicMock())
|
||||||
|
|
||||||
telegram = Telegram(get_patched_freqtradebot(mocker, default_conf))
|
telegram = Telegram(get_patched_freqtradebot(mocker, default_conf))
|
||||||
assert telegram._updater is None
|
|
||||||
assert telegram._config == default_conf
|
assert telegram._config == default_conf
|
||||||
|
|
||||||
|
|
||||||
@ -881,7 +880,7 @@ def test_forcesell_handle_invalid(default_conf, update, mocker) -> None:
|
|||||||
context.args = []
|
context.args = []
|
||||||
telegram._forcesell(update=update, context=context)
|
telegram._forcesell(update=update, context=context)
|
||||||
assert msg_mock.call_count == 1
|
assert msg_mock.call_count == 1
|
||||||
assert 'invalid argument' in msg_mock.call_args_list[0][0][0]
|
assert "You must specify a trade-id or 'all'." in msg_mock.call_args_list[0][0][0]
|
||||||
|
|
||||||
# Invalid argument
|
# Invalid argument
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
@ -1251,7 +1250,7 @@ def test_telegram_delete_trade(mocker, update, default_conf, fee):
|
|||||||
context.args = []
|
context.args = []
|
||||||
|
|
||||||
telegram._delete_trade(update=update, context=context)
|
telegram._delete_trade(update=update, context=context)
|
||||||
assert "invalid argument" in msg_mock.call_args_list[0][0][0]
|
assert "Trade-id not set." in msg_mock.call_args_list[0][0][0]
|
||||||
|
|
||||||
msg_mock.reset_mock()
|
msg_mock.reset_mock()
|
||||||
create_mock_trades(fee)
|
create_mock_trades(fee)
|
||||||
|
Loading…
Reference in New Issue
Block a user