Fix tests due to new exit behavior

This commit is contained in:
Matthias
2023-12-30 08:58:44 +01:00
parent 79e15591ef
commit e9c04debfb
2 changed files with 17 additions and 2 deletions

View File

@@ -1166,6 +1166,8 @@ async def test_telegram_forceexit_handle(default_conf, update, ticker, fee,
'stake_amount': 0.0009999999999054,
'sub_trade': False,
'cumulative_profit': 0.0,
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg
@@ -1239,6 +1241,8 @@ async def test_telegram_force_exit_down_handle(default_conf, update, ticker, fee
'stake_amount': 0.0009999999999054,
'sub_trade': False,
'cumulative_profit': 0.0,
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg
@@ -1302,6 +1306,8 @@ async def test_forceexit_all_handle(default_conf, update, ticker, fee, mocker) -
'stake_amount': 0.0009999999999054,
'sub_trade': False,
'cumulative_profit': 0.0,
'is_final_exit': False,
'final_profit_ratio': None,
} == msg
@@ -2220,7 +2226,7 @@ def test_send_msg_sell_notification(default_conf, mocker) -> None:
assert msg_mock.call_args[0][0] == (
'\N{WARNING SIGN} *Binance (dry):* Partially exiting KEY/ETH (#1)\n'
'*Unrealized Sub Profit:* `-57.41% (loss: -0.05746268 ETH / -24.812 USD)`\n'
'*Cumulative Profit:* (`-0.15746268 ETH / -24.812 USD`)\n'
'*Cumulative Profit:* `(-0.15746268 ETH / -24.812 USD)`\n'
'*Enter Tag:* `buy_signal1`\n'
'*Exit Reason:* `stop_loss`\n'
'*Direction:* `Long`\n'

View File

@@ -3777,6 +3777,8 @@ def test_execute_trade_exit_up(default_conf_usdt, ticker_usdt, fee, ticker_usdt_
'sub_trade': False,
'cumulative_profit': 0.0,
'stake_amount': pytest.approx(60),
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg
@@ -3842,6 +3844,8 @@ def test_execute_trade_exit_down(default_conf_usdt, ticker_usdt, fee, ticker_usd
'sub_trade': False,
'cumulative_profit': 0.0,
'stake_amount': pytest.approx(60),
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg
@@ -3928,6 +3932,8 @@ def test_execute_trade_exit_custom_exit_price(
'sub_trade': False,
'cumulative_profit': 0.0,
'stake_amount': pytest.approx(60),
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg
@@ -4001,6 +4007,8 @@ def test_execute_trade_exit_down_stoploss_on_exchange_dry_run(
'sub_trade': False,
'cumulative_profit': 0.0,
'stake_amount': pytest.approx(60),
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg
@@ -4267,7 +4275,8 @@ def test_execute_trade_exit_market_order(
'sub_trade': False,
'cumulative_profit': 0.0,
'stake_amount': pytest.approx(60),
'is_final_exit': False,
'final_profit_ratio': None,
} == last_msg