test: update stopentry related tests for rpc api and telegram

This commit is contained in:
Axel-CH
2025-03-23 00:27:52 -04:00
parent 3ec72f88e2
commit 85772ac7f7
2 changed files with 9 additions and 11 deletions

View File

@@ -535,21 +535,22 @@ def test_api_reloadconf(botclient):
def test_api_stopentry(botclient):
ftbot, client = botclient
assert ftbot.config["max_open_trades"] != 0
rc = client_post(client, f"{BASE_URI}/stopbuy")
assert_response(rc)
assert rc.json() == {"status": "pausing trader ..."}
rc = client_post(client, f"{BASE_URI}/stopbuy")
assert_response(rc)
assert rc.json() == {
"status": "No more entries will occur from now. Run /reload_config to reset."
"status": "No more entries will occur from now. Run /start to enable entries."
}
assert ftbot.config["max_open_trades"] == 0
rc = client_post(client, f"{BASE_URI}/stopentry")
assert_response(rc)
assert rc.json() == {
"status": "No more entries will occur from now. Run /reload_config to reset."
"status": "No more entries will occur from now. Run /start to enable entries."
}
assert ftbot.config["max_open_trades"] == 0
def test_api_balance(botclient, mocker, rpc_balance, tickers):