mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
test: adjust further tests
This commit is contained in:
@@ -1206,7 +1206,8 @@ def test_api_entries(botclient, fee):
|
||||
resp = response[0]
|
||||
assert resp["enter_tag"] == "TEST1"
|
||||
assert resp["count"] == 1
|
||||
assert resp["profit_pct"] == 0.5
|
||||
assert resp["profit_pct"] == 0.0
|
||||
assert pytest.approx(resp["profit_ratio"]) == 0.000038609756
|
||||
|
||||
|
||||
def test_api_exits(botclient, fee):
|
||||
@@ -1225,7 +1226,8 @@ def test_api_exits(botclient, fee):
|
||||
resp = response[0]
|
||||
assert resp["exit_reason"] == "sell_signal"
|
||||
assert resp["count"] == 1
|
||||
assert resp["profit_pct"] == 0.5
|
||||
assert resp["profit_pct"] == 0.0
|
||||
assert pytest.approx(resp["profit_ratio"]) == 0.000038609756
|
||||
|
||||
|
||||
def test_api_mix_tag(botclient, fee):
|
||||
|
||||
@@ -1611,7 +1611,7 @@ async def test_telegram_entry_tag_performance_handle(
|
||||
await telegram._enter_tag_performance(update=update, context=context)
|
||||
assert msg_mock.call_count == 1
|
||||
assert "Entry Tag Performance" in msg_mock.call_args_list[0][0][0]
|
||||
assert "`TEST1\t3.987 USDT (5.00%) (1)`" in msg_mock.call_args_list[0][0][0]
|
||||
assert "`TEST1\t3.987 USDT (1.99%) (1)`" in msg_mock.call_args_list[0][0][0]
|
||||
|
||||
context.args = ["XRP/USDT"]
|
||||
await telegram._enter_tag_performance(update=update, context=context)
|
||||
@@ -1644,7 +1644,7 @@ async def test_telegram_exit_reason_performance_handle(
|
||||
await telegram._exit_reason_performance(update=update, context=context)
|
||||
assert msg_mock.call_count == 1
|
||||
assert "Exit Reason Performance" in msg_mock.call_args_list[0][0][0]
|
||||
assert "`roi\t2.842 USDT (10.00%) (1)`" in msg_mock.call_args_list[0][0][0]
|
||||
assert "`roi\t2.842 USDT (9.47%) (1)`" in msg_mock.call_args_list[0][0][0]
|
||||
context.args = ["XRP/USDT"]
|
||||
|
||||
await telegram._exit_reason_performance(update=update, context=context)
|
||||
|
||||
Reference in New Issue
Block a user