Fix possible race condition during testing
Order would sometimes fail to sell during tests, probably because time between current time and creation was 0
This commit is contained in:
parent
89ed2e0127
commit
f1d406b1e6
@ -604,6 +604,7 @@ def test_handle_trade(default_conf, limit_buy_order, limit_sell_order, fee, mock
|
||||
trade = Trade.query.first()
|
||||
assert trade
|
||||
|
||||
time.sleep(0.01) # Race condition fix
|
||||
trade.update(limit_buy_order)
|
||||
assert trade.is_open is True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user