mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve test resiliance by properly setting Order object
This commit is contained in:
parent
b26126cb57
commit
966de19611
|
@ -37,6 +37,7 @@ def generate_mock_trade(pair: str, fee: float, is_open: bool,
|
|||
trade.orders.append(Order(
|
||||
ft_order_side=trade.entry_side,
|
||||
order_id=f'{pair}-{trade.entry_side}-{trade.open_date}',
|
||||
ft_is_open=False,
|
||||
ft_pair=pair,
|
||||
amount=trade.amount,
|
||||
filled=trade.amount,
|
||||
|
@ -51,6 +52,7 @@ def generate_mock_trade(pair: str, fee: float, is_open: bool,
|
|||
trade.orders.append(Order(
|
||||
ft_order_side=trade.exit_side,
|
||||
order_id=f'{pair}-{trade.exit_side}-{trade.close_date}',
|
||||
ft_is_open=False,
|
||||
ft_pair=pair,
|
||||
amount=trade.amount,
|
||||
filled=trade.amount,
|
||||
|
|
|
@ -654,6 +654,7 @@ def test_trade_close(fee):
|
|||
trade.orders.append(Order(
|
||||
ft_order_side=trade.entry_side,
|
||||
order_id=f'{trade.pair}-{trade.entry_side}-{trade.open_date}',
|
||||
ft_is_open=False,
|
||||
ft_pair=trade.pair,
|
||||
amount=trade.amount,
|
||||
filled=trade.amount,
|
||||
|
@ -667,6 +668,7 @@ def test_trade_close(fee):
|
|||
trade.orders.append(Order(
|
||||
ft_order_side=trade.exit_side,
|
||||
order_id=f'{trade.pair}-{trade.exit_side}-{trade.open_date}',
|
||||
ft_is_open=False,
|
||||
ft_pair=trade.pair,
|
||||
amount=trade.amount,
|
||||
filled=trade.amount,
|
||||
|
|
Loading…
Reference in New Issue
Block a user