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:
enenn 2018-04-15 12:50:47 +02:00
parent 89ed2e0127
commit f1d406b1e6

View File

@ -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