Merge branch 'develop' into pr/mkavinkumar1/6545
This commit is contained in:
@@ -3050,6 +3050,7 @@ def test_handle_cancel_enter_corder_empty(mocker, default_conf_usdt, limit_order
|
||||
trade.entry_side = "buy"
|
||||
trade.open_rate = 200
|
||||
trade.entry_side = "buy"
|
||||
trade.open_order_id = "open_order_noop"
|
||||
l_order['filled'] = 0.0
|
||||
l_order['status'] = 'open'
|
||||
reason = CANCEL_REASON['TIMEOUT']
|
||||
@@ -3596,7 +3597,7 @@ def test_may_execute_trade_exit_after_stoploss_on_exchange_hit(
|
||||
assert rpc_mock.call_count == 3
|
||||
assert rpc_mock.call_args_list[0][0][0]['type'] == RPCMessageType.ENTRY
|
||||
assert rpc_mock.call_args_list[1][0][0]['type'] == RPCMessageType.ENTRY_FILL
|
||||
assert rpc_mock.call_args_list[2][0][0]['type'] == RPCMessageType.EXIT
|
||||
assert rpc_mock.call_args_list[2][0][0]['type'] == RPCMessageType.EXIT_FILL
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -4805,9 +4806,6 @@ def test_startup_update_open_orders(mocker, default_conf_usdt, fee, caplog, is_s
|
||||
freqtrade.config['dry_run'] = False
|
||||
freqtrade.startup_update_open_orders()
|
||||
|
||||
assert log_has_re(r"Error updating Order .*", caplog)
|
||||
caplog.clear()
|
||||
|
||||
assert len(Order.get_open_orders()) == 3
|
||||
matching_buy_order = mock_order_4(is_short=is_short)
|
||||
matching_buy_order.update({
|
||||
@@ -4818,6 +4816,11 @@ def test_startup_update_open_orders(mocker, default_conf_usdt, fee, caplog, is_s
|
||||
# Only stoploss and sell orders are kept open
|
||||
assert len(Order.get_open_orders()) == 2
|
||||
|
||||
caplog.clear()
|
||||
mocker.patch('freqtrade.exchange.Exchange.fetch_order', side_effect=InvalidOrderException)
|
||||
freqtrade.startup_update_open_orders()
|
||||
assert log_has_re(r"Error updating Order .*", caplog)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("init_persistence")
|
||||
@pytest.mark.parametrize("is_short", [False, True])
|
||||
|
||||
Reference in New Issue
Block a user