mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
tests: update force_sell test to not use empty amount column
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user