test: add autospec=True to just changed tests

This commit is contained in:
Matthias
2025-12-15 07:04:40 +01:00
parent f0908a1043
commit d4aee7e433
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ def test_fetch_stoploss_order_gate(default_conf, mocker):
def test_cancel_stoploss_order_gate(default_conf, mocker):
exchange = get_patched_exchange(mocker, default_conf, exchange="gate")
cancel_order_mock = mocker.patch.object(exchange, "cancel_order")
cancel_order_mock = mocker.patch.object(exchange, "cancel_order", autospec=True)
exchange.cancel_stoploss_order("1234", "ETH/BTC")
assert cancel_order_mock.call_count == 1

View File

@@ -661,7 +661,7 @@ def test_stoploss_adjust_okx(mocker, default_conf, sl1, sl2, sl3, side):
def test_stoploss_cancel_okx(mocker, default_conf):
exchange = get_patched_exchange(mocker, default_conf, exchange="okx")
co_mock = mocker.patch.object(exchange, "cancel_order")
co_mock = mocker.patch.object(exchange, "cancel_order", autospec=True)
exchange.cancel_stoploss_order("1234", "ETH/USDT")
assert co_mock.call_count == 1