File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2267,6 +2267,18 @@ def test_manage_open_orders_exit_usercustom(
22672267 freqtrade .manage_open_orders ()
22682268 assert log_has_re ("Emergency exiting trade.*" , caplog )
22692269 assert et_mock .call_count == 1
2270+ # Full exit
2271+ assert et_mock .call_args_list [0 ][1 ]["sub_trade_amt" ] == 30
2272+
2273+ et_mock .reset_mock ()
2274+
2275+ # Full partially filled order
2276+ # Only places the order for the remaining amount
2277+ limit_sell_order_old ["remaining" ] = open_trade_usdt .amount - 10
2278+ freqtrade .manage_open_orders ()
2279+ assert log_has_re ("Emergency exiting trade.*" , caplog )
2280+ assert et_mock .call_count == 1
2281+ assert et_mock .call_args_list [0 ][1 ]["sub_trade_amt" ] == 20.0
22702282
22712283
22722284@pytest .mark .parametrize ("is_short" , [False , True ])
You can’t perform that action at this time.
0 commit comments