Skip to content

Commit 5d3a056

Browse files
committed
test: update api_performance test to USDT
1 parent e9eee11 commit 5d3a056

File tree

1 file changed

+21
-12
lines changed

1 file changed

+21
-12
lines changed

tests/rpc/test_rpc_apiserver.py

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
CURRENT_TEST_STRATEGY,
3636
EXMS,
3737
create_mock_trades,
38+
create_mock_trades_usdt,
3839
get_mock_coro,
3940
get_patched_freqtradebot,
4041
log_has,
@@ -1156,27 +1157,35 @@ def test_api_performance(botclient, fee):
11561157
ftbot, client = botclient
11571158
patch_get_signal(ftbot)
11581159

1159-
create_mock_trades(fee)
1160+
create_mock_trades_usdt(fee)
11601161

11611162
rc = client_get(client, f"{BASE_URI}/performance")
11621163
assert_response(rc)
1163-
assert len(rc.json()) == 2
1164+
assert len(rc.json()) == 3
11641165
assert rc.json() == [
11651166
{
11661167
"count": 1,
1167-
"pair": "ETC/BTC",
1168-
"profit": 0.5,
1169-
"profit_pct": 0.5,
1170-
"profit_ratio": 0.005,
1171-
"profit_abs": 0.000584127,
1168+
"pair": "NEO/USDT",
1169+
"profit": 5.0,
1170+
"profit_pct": 5,
1171+
"profit_ratio": 0.05,
1172+
"profit_abs": 3.9875,
1173+
},
1174+
{
1175+
"count": 1,
1176+
"pair": "XRP/USDT",
1177+
"profit": 10.0,
1178+
"profit_abs": 2.8425,
1179+
"profit_pct": 10.0,
1180+
"profit_ratio": 0.1,
11721181
},
11731182
{
11741183
"count": 1,
1175-
"pair": "XRP/BTC",
1176-
"profit": 1.0,
1177-
"profit_pct": 1.0,
1178-
"profit_ratio": 0.01,
1179-
"profit_abs": 0.000155,
1184+
"pair": "LTC/USDT",
1185+
"profit": -20.0,
1186+
"profit_abs": -4.09,
1187+
"profit_pct": -20.0,
1188+
"profit_ratio": -0.2,
11801189
},
11811190
]
11821191

0 commit comments

Comments
 (0)