From 5c0d89feb54dab1499d0f1cc216e38597f556286 Mon Sep 17 00:00:00 2001 From: axel Date: Fri, 23 Jun 2023 17:53:54 -0400 Subject: [PATCH] fix test_handle_insufficient_funds with comments --- tests/test_freqtradebot.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test_freqtradebot.py b/tests/test_freqtradebot.py index cca06b89f..1cd027bfc 100644 --- a/tests/test_freqtradebot.py +++ b/tests/test_freqtradebot.py @@ -5549,7 +5549,9 @@ def test_handle_insufficient_funds(mocker, default_conf_usdt, fee, is_short, cap # Open buy order trade = trades[3] reset_open_orders(trade) - assert not trade.has_open_orders + + # This part in not relevant anymore + # assert not trade.has_open_orders assert trade.stoploss_order_id is None freqtrade.handle_insufficient_funds(trade) @@ -5558,7 +5560,7 @@ def test_handle_insufficient_funds(mocker, default_conf_usdt, fee, is_short, cap assert mock_fo.call_count == 1 assert mock_uts.call_count == 1 # Found open buy order - assert trade.open_order_id is not None + assert trade.has_open_orders assert trade.stoploss_order_id is None caplog.clear() @@ -5586,7 +5588,8 @@ def test_handle_insufficient_funds(mocker, default_conf_usdt, fee, is_short, cap # Open sell order trade = trades[5] reset_open_orders(trade) - assert not trade.has_open_orders + # This part in not relevant anymore + # assert not trade.has_open_orders assert trade.stoploss_order_id is None freqtrade.handle_insufficient_funds(trade) @@ -5595,7 +5598,7 @@ def test_handle_insufficient_funds(mocker, default_conf_usdt, fee, is_short, cap assert mock_fo.call_count == 1 assert mock_uts.call_count == 1 # sell-orderid is "refound" and added to the trade - assert trade.open_order_id == order['id'] + assert trade.open_orders_ids[0] == order['id'] assert trade.stoploss_order_id is None caplog.clear()