mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-15 20:31:43 +00:00
test: update tests with new fields
This commit is contained in:
@@ -1479,6 +1479,8 @@ def test_to_json(fee):
|
||||
"contract_size": 1,
|
||||
"orders": [],
|
||||
"has_open_orders": False,
|
||||
"nr_of_successful_entries": 0,
|
||||
"nr_of_successful_exits": 0,
|
||||
}
|
||||
|
||||
# Simulate dry_run entries
|
||||
@@ -1570,6 +1572,8 @@ def test_to_json(fee):
|
||||
"contract_size": 1,
|
||||
"orders": [],
|
||||
"has_open_orders": False,
|
||||
"nr_of_successful_entries": 0,
|
||||
"nr_of_successful_exits": 0,
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
|
||||
"contract_size": 1,
|
||||
"has_open_orders": False,
|
||||
"nr_of_successful_entries": ANY,
|
||||
"nr_of_successful_exits": ANY,
|
||||
"orders": [
|
||||
{
|
||||
"amount": 91.07468123,
|
||||
|
||||
@@ -421,7 +421,8 @@ async def test_telegram_status_multi_entry(default_conf, update, mocker, fee) ->
|
||||
assert msg_mock.call_count == 4
|
||||
msg = msg_mock.call_args_list[3][0][0]
|
||||
assert re.search(r"Number of Entries.*2", msg)
|
||||
assert re.search(r"Number of Exits.*1", msg)
|
||||
# Exit order is still open, hence not a successful exit
|
||||
assert re.search(r"Number of Exits.*0", msg)
|
||||
assert re.search(r"Close Date:", msg) is None
|
||||
assert re.search(r"Close Profit:", msg) is None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user