Fix delete_Trade api test
This commit is contained in:
parent
7f1080368b
commit
dcefb3eb9c
@ -620,10 +620,11 @@ def test_api_delete_trade(botclient, mocker, fee, markets):
|
|||||||
assert_response(rc, 502)
|
assert_response(rc, 502)
|
||||||
|
|
||||||
create_mock_trades(fee)
|
create_mock_trades(fee)
|
||||||
Trade.query.session.flush()
|
|
||||||
ftbot.strategy.order_types['stoploss_on_exchange'] = True
|
ftbot.strategy.order_types['stoploss_on_exchange'] = True
|
||||||
trades = Trade.query.all()
|
trades = Trade.query.all()
|
||||||
trades[1].stoploss_order_id = '1234'
|
trades[1].stoploss_order_id = '1234'
|
||||||
|
Trade.commit()
|
||||||
assert len(trades) > 2
|
assert len(trades) > 2
|
||||||
|
|
||||||
rc = client_delete(client, f"{BASE_URI}/trades/1")
|
rc = client_delete(client, f"{BASE_URI}/trades/1")
|
||||||
|
Loading…
Reference in New Issue
Block a user