Change mock-status to be open when testing unfilled...
This commit is contained in:
parent
981976681a
commit
d3a0ab8096
@ -2314,6 +2314,7 @@ def test_handle_timedout_limit_buy(mocker, caplog, default_conf, limit_buy_order
|
||||
trade = MagicMock()
|
||||
trade.pair = 'LTC/ETH'
|
||||
limit_buy_order['filled'] = 0
|
||||
limit_buy_order['status'] = 'open'
|
||||
assert freqtrade.handle_timedout_limit_buy(trade, limit_buy_order)
|
||||
assert cancel_order_mock.call_count == 1
|
||||
|
||||
@ -2367,8 +2368,9 @@ def test_handle_timedout_limit_buy_corder_empty(mocker, default_conf, limit_buy_
|
||||
Trade.session = MagicMock()
|
||||
trade = MagicMock()
|
||||
trade.pair = 'LTC/ETH'
|
||||
limit_buy_order['remaining'] = limit_buy_order['amount']
|
||||
limit_buy_order['filled'] = 0.0
|
||||
limit_buy_order['status'] = 'open'
|
||||
|
||||
assert freqtrade.handle_timedout_limit_buy(trade, limit_buy_order)
|
||||
assert cancel_order_mock.call_count == 1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user