convert start, stop and reload_conf to return a dict
This commit is contained in:
@@ -358,11 +358,11 @@ def test_rpc_start(mocker, default_conf) -> None:
|
||||
freqtradebot.state = State.STOPPED
|
||||
|
||||
result = rpc._rpc_start()
|
||||
assert '`Starting trader ...`' in result
|
||||
assert {'status': 'starting trader ...'} == result
|
||||
assert freqtradebot.state == State.RUNNING
|
||||
|
||||
result = rpc._rpc_start()
|
||||
assert '*Status:* `already running`' in result
|
||||
assert {'status': 'already running'} == result
|
||||
assert freqtradebot.state == State.RUNNING
|
||||
|
||||
|
||||
@@ -384,11 +384,12 @@ def test_rpc_stop(mocker, default_conf) -> None:
|
||||
freqtradebot.state = State.RUNNING
|
||||
|
||||
result = rpc._rpc_stop()
|
||||
assert '`Stopping trader ...`' in result
|
||||
assert {'status': 'stopping trader ...'} == result
|
||||
assert freqtradebot.state == State.STOPPED
|
||||
|
||||
result = rpc._rpc_stop()
|
||||
assert '*Status:* `already stopped`' in result
|
||||
|
||||
assert {'status': 'already stopped'} == result
|
||||
assert freqtradebot.state == State.STOPPED
|
||||
|
||||
|
||||
|
@@ -664,7 +664,7 @@ def test_stop_handle(default_conf, update, mocker) -> None:
|
||||
telegram._stop(bot=MagicMock(), update=update)
|
||||
assert freqtradebot.state == State.STOPPED
|
||||
assert msg_mock.call_count == 1
|
||||
assert 'Stopping trader' in msg_mock.call_args_list[0][0][0]
|
||||
assert 'stopping trader' in msg_mock.call_args_list[0][0][0]
|
||||
|
||||
|
||||
def test_stop_handle_already_stopped(default_conf, update, mocker) -> None:
|
||||
@@ -708,7 +708,7 @@ def test_reload_conf_handle(default_conf, update, mocker) -> None:
|
||||
telegram._reload_conf(bot=MagicMock(), update=update)
|
||||
assert freqtradebot.state == State.RELOAD_CONF
|
||||
assert msg_mock.call_count == 1
|
||||
assert 'Reloading config' in msg_mock.call_args_list[0][0][0]
|
||||
assert 'reloading config' in msg_mock.call_args_list[0][0][0]
|
||||
|
||||
|
||||
def test_forcesell_handle(default_conf, update, ticker, fee,
|
||||
|
Reference in New Issue
Block a user