test: adapt starting capital tests for tradable_balance_ratio
This commit is contained in:
@@ -680,8 +680,8 @@ def test_rpc_balance_handle(default_conf_usdt, mocker, tickers):
|
||||
]
|
||||
assert pytest.approx(result["total_bot"]) == 69.5
|
||||
assert pytest.approx(result["total"]) == 2824.83464 # ETH stake is missing.
|
||||
assert result["starting_capital"] == 50
|
||||
assert result["starting_capital_ratio"] == pytest.approx(0.3899999)
|
||||
assert result["starting_capital"] == 50 * default_conf_usdt["tradable_balance_ratio"]
|
||||
assert result["starting_capital_ratio"] == pytest.approx(0.4040404)
|
||||
|
||||
|
||||
def test_rpc_start(mocker, default_conf) -> None:
|
||||
|
||||
@@ -1056,6 +1056,7 @@ def test_api_edge_disabled(botclient, mocker, ticker, fee, markets):
|
||||
)
|
||||
def test_api_profit(botclient, mocker, ticker, fee, markets, is_short, expected):
|
||||
ftbot, client = botclient
|
||||
ftbot.config["tradable_balance_ratio"] = 1
|
||||
patch_get_signal(ftbot)
|
||||
mocker.patch.multiple(
|
||||
EXMS,
|
||||
|
||||
@@ -1087,7 +1087,7 @@ async def test_balance_handle_empty_response_dry(default_conf, update, mocker) -
|
||||
result = msg_mock.call_args_list[0][0][0]
|
||||
assert msg_mock.call_count == 1
|
||||
assert "*Warning:* Simulated balances in Dry Mode." in result
|
||||
assert "Starting capital: `1000 BTC`" in result
|
||||
assert "Starting capital: `990 BTC`" in result
|
||||
|
||||
|
||||
async def test_balance_handle_too_large_response(default_conf, update, mocker) -> None:
|
||||
|
||||
Reference in New Issue
Block a user