diff --git a/tests/rpc/test_rpc.py b/tests/rpc/test_rpc.py index feb7f9f1a..4c2453145 100644 --- a/tests/rpc/test_rpc.py +++ b/tests/rpc/test_rpc.py @@ -762,7 +762,7 @@ def test_rpc_force_exit(default_conf, ticker, fee, mocker) -> None: freqtradebot.enter_positions() # make an limit-buy open trade trade = Trade.session.scalars(select(Trade).filter(Trade.id == "3")).first() - filled_amount = trade.amount / 2 + filled_amount = trade.amount_requested / 2 # Fetch order - it's open first, and closed after cancel_order is called. mocker.patch( f"{EXMS}.fetch_order", @@ -799,7 +799,7 @@ def test_rpc_force_exit(default_conf, ticker, fee, mocker) -> None: cancel_order_mock.reset_mock() trade = Trade.session.scalars(select(Trade).filter(Trade.id == "3")).first() - amount = trade.amount + amount = trade.amount_requested # make an limit-sell open order trade mocker.patch( f"{EXMS}.fetch_order", @@ -832,7 +832,7 @@ def test_rpc_force_exit(default_conf, ticker, fee, mocker) -> None: assert cancel_order_mock.call_count == 0 trade = Trade.session.scalars(select(Trade).filter(Trade.id == "4")).first() - amount = trade.amount + amount = trade.amount_requested # make an limit-buy open trade, if there is no 'filled', don't sell it mocker.patch( f"{EXMS}.fetch_order",