From 3d8d2fc0c6744c032ed001acbba3ea0c35c22048 Mon Sep 17 00:00:00 2001 From: Axel-CH Date: Fri, 28 Mar 2025 02:32:15 -0400 Subject: [PATCH] test: update tests related to paused state status message wording --- tests/rpc/test_rpc.py | 4 +--- tests/rpc/test_rpc_apiserver.py | 10 +++------- tests/rpc/test_rpc_telegram.py | 5 ++++- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/rpc/test_rpc.py b/tests/rpc/test_rpc.py index bebd708cf..cf3d2cf18 100644 --- a/tests/rpc/test_rpc.py +++ b/tests/rpc/test_rpc.py @@ -816,9 +816,7 @@ def test_rpc_pause(mocker, default_conf) -> None: freqtradebot.state = State.PAUSED result = rpc._rpc_pause() - assert { - "status": "No more entries will occur from now. Run /start to enable entries." - } == result + assert {"status": "paused, no entries will occur. Run /start to enable entries."} == result def test_rpc_force_exit(default_conf, ticker, fee, mocker) -> None: diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index 963a39ec3..7a2d9f4f9 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -538,19 +538,15 @@ def test_api_pause(botclient): rc = client_post(client, f"{BASE_URI}/pause") assert_response(rc) - assert rc.json() == {"status": "pausing trader ..."} + assert rc.json() == {"status": "paused, no entries will occur. Run /start to enable entries."} rc = client_post(client, f"{BASE_URI}/pause") assert_response(rc) - assert rc.json() == { - "status": "No more entries will occur from now. Run /start to enable entries." - } + assert rc.json() == {"status": "paused, no entries will occur. Run /start to enable entries."} rc = client_post(client, f"{BASE_URI}/stopentry") assert_response(rc) - assert rc.json() == { - "status": "No more entries will occur from now. Run /start to enable entries." - } + assert rc.json() == {"status": "paused, no entries will occur. Run /start to enable entries."} def test_api_balance(botclient, mocker, rpc_balance, tickers): diff --git a/tests/rpc/test_rpc_telegram.py b/tests/rpc/test_rpc_telegram.py index 81a673ebc..61569d8f4 100644 --- a/tests/rpc/test_rpc_telegram.py +++ b/tests/rpc/test_rpc_telegram.py @@ -1229,7 +1229,10 @@ async def test_pause_handle(default_conf, update, mocker) -> None: await telegram._pause(update=update, context=MagicMock()) assert freqtradebot.state == State.PAUSED assert msg_mock.call_count == 1 - assert "pausing trader ..." in msg_mock.call_args_list[0][0][0] + assert ( + "paused, no entries will occur. Run /start to enable entries." + in msg_mock.call_args_list[0][0][0] + ) async def test_reload_config_handle(default_conf, update, mocker) -> None: