test: imrpove testcase
This commit is contained in:
@@ -303,6 +303,7 @@ def mock_order_usdt_6(is_short: bool):
|
|||||||
"side": entry_side(is_short),
|
"side": entry_side(is_short),
|
||||||
"type": "limit",
|
"type": "limit",
|
||||||
"price": 10.0,
|
"price": 10.0,
|
||||||
|
"cost": 20.0,
|
||||||
"amount": 2.0,
|
"amount": 2.0,
|
||||||
"filled": 2.0,
|
"filled": 2.0,
|
||||||
"remaining": 0.0,
|
"remaining": 0.0,
|
||||||
@@ -317,6 +318,7 @@ def mock_order_usdt_6_exit(is_short: bool):
|
|||||||
"side": exit_side(is_short),
|
"side": exit_side(is_short),
|
||||||
"type": "limit",
|
"type": "limit",
|
||||||
"price": 12.0,
|
"price": 12.0,
|
||||||
|
"cost": 24.0,
|
||||||
"amount": 2.0,
|
"amount": 2.0,
|
||||||
"filled": 0.0,
|
"filled": 0.0,
|
||||||
"remaining": 2.0,
|
"remaining": 2.0,
|
||||||
|
|||||||
@@ -4525,6 +4525,7 @@ def test_check_for_open_trades(mocker, default_conf_usdt, fee, is_short):
|
|||||||
def test_startup_update_open_orders(mocker, default_conf_usdt, fee, caplog, is_short):
|
def test_startup_update_open_orders(mocker, default_conf_usdt, fee, caplog, is_short):
|
||||||
freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt)
|
freqtrade = get_patched_freqtradebot(mocker, default_conf_usdt)
|
||||||
create_mock_trades(fee, is_short=is_short)
|
create_mock_trades(fee, is_short=is_short)
|
||||||
|
mocker.patch(f"{EXMS}._dry_is_price_crossed", return_value=False)
|
||||||
|
|
||||||
freqtrade.startup_update_open_orders()
|
freqtrade.startup_update_open_orders()
|
||||||
assert not log_has_re(r"Error updating Order .*", caplog)
|
assert not log_has_re(r"Error updating Order .*", caplog)
|
||||||
|
|||||||
Reference in New Issue
Block a user