Update test to not fail randomly

This commit is contained in:
Matthias 2022-02-26 15:53:01 +01:00
parent 75868a851b
commit e25929f50a

View File

@ -610,7 +610,10 @@ def test_api_trade_single(botclient, mocker, fee, ticker, markets, is_short):
assert rc.json()['detail'] == 'Trade not found.'
create_mock_trades(fee, is_short=is_short)
Trade.query.session.flush()
# The below line avoids random test failures.
# It's unclear why.
assert len(Trade.get_trades().all()) > 1
rc = client_get(client, f"{BASE_URI}/trade/3")
assert_response(rc)