mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Fix some more tests
This commit is contained in:
@@ -280,19 +280,19 @@ def fix_old_dry_orders(engine):
|
||||
# - current Trade is closed
|
||||
# - current Order trade_id not equal to current Trade.id
|
||||
# - current Order not stoploss
|
||||
# TODO: is this still necessary ? how can this be done now ?
|
||||
# stmt = update(Order).where(
|
||||
# Order.ft_is_open.is_(True),
|
||||
# tuple_(Order.ft_trade_id, Order.order_id).not_in(
|
||||
# select(
|
||||
# Trade.id, Trade.stoploss_order_id
|
||||
# ).where(Trade.stoploss_order_id.is_not(None))
|
||||
# ),
|
||||
# Order.ft_order_side == 'stoploss',
|
||||
# Order.order_id.like('dry%'),
|
||||
|
||||
stmt = update(Order).where(
|
||||
Order.ft_is_open.is_(True),
|
||||
tuple_(Order.ft_trade_id, Order.order_id).not_in(
|
||||
select(
|
||||
Trade.id, Trade.stoploss_order_id
|
||||
).where(Trade.stoploss_order_id.is_not(None))
|
||||
),
|
||||
Order.ft_order_side == 'stoploss',
|
||||
Order.order_id.like('dry%'),
|
||||
|
||||
).values(ft_is_open=False)
|
||||
connection.execute(stmt)
|
||||
# ).values(ft_is_open=False)
|
||||
# connection.execute(stmt)
|
||||
|
||||
# Close dry-run orders for closed trades.
|
||||
stmt = update(Order).where(
|
||||
|
||||
@@ -1432,7 +1432,6 @@ def test_to_json(fee):
|
||||
'stop_loss_abs': None,
|
||||
'stop_loss_ratio': None,
|
||||
'stop_loss_pct': None,
|
||||
'stoploss_order_id': None,
|
||||
'stoploss_last_update': None,
|
||||
'stoploss_last_update_timestamp': None,
|
||||
'initial_stop_loss_abs': None,
|
||||
@@ -1500,7 +1499,6 @@ def test_to_json(fee):
|
||||
'stop_loss_abs': None,
|
||||
'stop_loss_pct': None,
|
||||
'stop_loss_ratio': None,
|
||||
'stoploss_order_id': None,
|
||||
'stoploss_last_update': None,
|
||||
'stoploss_last_update_timestamp': None,
|
||||
'initial_stop_loss_abs': None,
|
||||
|
||||
Reference in New Issue
Block a user