diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index b634ec2f7..4050dcbdb 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -633,9 +633,6 @@ def test_api_delete_trade(botclient, mocker, fee, markets, is_short): cancel_order=cancel_mock, cancel_stoploss_order=stoploss_mock, ) - rc = client_delete(client, f"{BASE_URI}/trades/1") - # Error - trade won't exist yet. - assert_response(rc, 502) create_mock_trades(fee, is_short=is_short) @@ -664,6 +661,10 @@ def test_api_delete_trade(botclient, mocker, fee, markets, is_short): assert len(trades) - 2 == len(Trade.query.all()) assert stoploss_mock.call_count == 1 + rc = client_delete(client, f"{BASE_URI}/trades/502") + # Error - trade won't exist. + assert_response(rc, 502) + def test_api_logs(botclient): ftbot, client = botclient