Fix random test failure (2nd try)
This commit is contained in:
parent
79ddc9abaa
commit
e9f3f3d859
@ -613,12 +613,9 @@ def test_api_trade_single(botclient, mocker, fee, ticker, markets, is_short):
|
||||
assert_response(rc, 404)
|
||||
assert rc.json()['detail'] == 'Trade not found.'
|
||||
|
||||
Trade.query.session.rollback()
|
||||
create_mock_trades(fee, is_short=is_short)
|
||||
|
||||
# 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)
|
||||
assert rc.json()['trade_id'] == 3
|
||||
|
Loading…
Reference in New Issue
Block a user