mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-10 00:01:40 +00:00
test: improve api test to ensure the default is what we expect
This commit is contained in:
@@ -776,6 +776,10 @@ def test_api_trades(botclient, mocker, fee, markets, is_short):
|
||||
assert rc.json()["trades_count"] == 2
|
||||
assert rc.json()["total_trades"] == 2
|
||||
assert rc.json()["trades"][0]["is_short"] == is_short
|
||||
# Ensure the trades are sorted by trade_id (the default, see below)
|
||||
assert rc.json()["trades"][0]["trade_id"] == 2
|
||||
assert rc.json()["trades"][1]["trade_id"] == 3
|
||||
|
||||
rc = client_get(client, f"{BASE_URI}/trades?limit=1")
|
||||
assert_response(rc)
|
||||
assert len(rc.json()["trades"]) == 1
|
||||
|
||||
Reference in New Issue
Block a user