From 05ce3acc466dda62f7f65bb80d172d972d5923a5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 20 Apr 2021 21:28:13 +0200 Subject: [PATCH] Improve tests for api_trades --- docs/rest-api.md | 2 -- tests/rpc/test_rpc_apiserver.py | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/rest-api.md b/docs/rest-api.md index 514e0f719..a0029a44c 100644 --- a/docs/rest-api.md +++ b/docs/rest-api.md @@ -290,8 +290,6 @@ version whitelist Show the current whitelist. - - ``` ### OpenAPI interface diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index d87d4e59d..69d312e65 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -508,6 +508,7 @@ def test_api_trades(botclient, mocker, fee, markets): assert_response(rc) assert len(rc.json()) == 3 assert rc.json()['trades_count'] == 0 + assert rc.json()['total_trades'] == 0 create_mock_trades(fee) Trade.query.session.flush() @@ -516,10 +517,12 @@ def test_api_trades(botclient, mocker, fee, markets): assert_response(rc) assert len(rc.json()['trades']) == 2 assert rc.json()['trades_count'] == 2 + assert rc.json()['total_trades'] == 2 rc = client_get(client, f"{BASE_URI}/trades?limit=1") assert_response(rc) assert len(rc.json()['trades']) == 1 assert rc.json()['trades_count'] == 1 + assert rc.json()['total_trades'] == 2 def test_api_trade_single(botclient, mocker, fee, ticker, markets):