mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-16 04:41:15 +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,
|
"contract_size": 1,
|
||||||
"orders": [],
|
"orders": [],
|
||||||
"has_open_orders": False,
|
"has_open_orders": False,
|
||||||
|
"nr_of_successful_entries": 0,
|
||||||
|
"nr_of_successful_exits": 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Simulate dry_run entries
|
# Simulate dry_run entries
|
||||||
@@ -1570,6 +1572,8 @@ def test_to_json(fee):
|
|||||||
"contract_size": 1,
|
"contract_size": 1,
|
||||||
"orders": [],
|
"orders": [],
|
||||||
"has_open_orders": False,
|
"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,
|
"contract_size": 1,
|
||||||
"has_open_orders": False,
|
"has_open_orders": False,
|
||||||
"nr_of_successful_entries": ANY,
|
"nr_of_successful_entries": ANY,
|
||||||
|
"nr_of_successful_exits": ANY,
|
||||||
"orders": [
|
"orders": [
|
||||||
{
|
{
|
||||||
"amount": 91.07468123,
|
"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
|
assert msg_mock.call_count == 4
|
||||||
msg = msg_mock.call_args_list[3][0][0]
|
msg = msg_mock.call_args_list[3][0][0]
|
||||||
assert re.search(r"Number of Entries.*2", msg)
|
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 Date:", msg) is None
|
||||||
assert re.search(r"Close Profit:", msg) is None
|
assert re.search(r"Close Profit:", msg) is None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user