Fix fail test - add more TODO's
This commit is contained in:
parent
7508f79b6c
commit
5332c441b9
@ -2443,7 +2443,6 @@ def test_check_handle_timedout_buy_exception(
|
|||||||
default_conf_usdt, ticker_usdt, limit_buy_order_old, open_trade,
|
default_conf_usdt, ticker_usdt, limit_buy_order_old, open_trade,
|
||||||
is_short, fee, mocker
|
is_short, fee, mocker
|
||||||
) -> None:
|
) -> None:
|
||||||
# TODO-lev: use is_short or remove it
|
|
||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
cancel_order_mock = MagicMock()
|
cancel_order_mock = MagicMock()
|
||||||
patch_exchange(mocker)
|
patch_exchange(mocker)
|
||||||
@ -2457,7 +2456,7 @@ def test_check_handle_timedout_buy_exception(
|
|||||||
)
|
)
|
||||||
freqtrade = FreqtradeBot(default_conf_usdt)
|
freqtrade = FreqtradeBot(default_conf_usdt)
|
||||||
|
|
||||||
# open_trade.is_short = True
|
open_trade.is_short = is_short
|
||||||
Trade.query.session.add(open_trade)
|
Trade.query.session.add(open_trade)
|
||||||
|
|
||||||
# check it does cancel buy orders over the time limit
|
# check it does cancel buy orders over the time limit
|
||||||
@ -2476,7 +2475,8 @@ def test_check_handle_timedout_sell_usercustom(
|
|||||||
) -> None:
|
) -> None:
|
||||||
default_conf_usdt["unfilledtimeout"] = {"buy": 1440, "sell": 1440, "exit_timeout_count": 1}
|
default_conf_usdt["unfilledtimeout"] = {"buy": 1440, "sell": 1440, "exit_timeout_count": 1}
|
||||||
limit_sell_order_old['id'] = open_trade_usdt.open_order_id
|
limit_sell_order_old['id'] = open_trade_usdt.open_order_id
|
||||||
|
# TODO-lev:
|
||||||
|
# open_trade_usdt.is_short = is_short
|
||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
cancel_order_mock = MagicMock()
|
cancel_order_mock = MagicMock()
|
||||||
patch_exchange(mocker)
|
patch_exchange(mocker)
|
||||||
@ -2547,6 +2547,7 @@ def test_check_handle_timedout_sell(
|
|||||||
default_conf_usdt, ticker_usdt, limit_sell_order_old,
|
default_conf_usdt, ticker_usdt, limit_sell_order_old,
|
||||||
mocker, is_short, open_trade_usdt
|
mocker, is_short, open_trade_usdt
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# TODO-lev: use is_short or remove it
|
||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
cancel_order_mock = MagicMock()
|
cancel_order_mock = MagicMock()
|
||||||
limit_sell_order_old['id'] = open_trade_usdt.open_order_id
|
limit_sell_order_old['id'] = open_trade_usdt.open_order_id
|
||||||
@ -2582,6 +2583,7 @@ def test_check_handle_cancelled_sell(
|
|||||||
is_short, mocker, caplog
|
is_short, mocker, caplog
|
||||||
) -> None:
|
) -> None:
|
||||||
""" Handle sell order cancelled on exchange"""
|
""" Handle sell order cancelled on exchange"""
|
||||||
|
# TODO-lev: use is_short or remove it
|
||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
cancel_order_mock = MagicMock()
|
cancel_order_mock = MagicMock()
|
||||||
limit_sell_order_old.update({"status": "canceled", 'filled': 0.0})
|
limit_sell_order_old.update({"status": "canceled", 'filled': 0.0})
|
||||||
@ -2614,6 +2616,7 @@ def test_check_handle_timedout_partial(
|
|||||||
default_conf_usdt, ticker_usdt, limit_buy_order_old_partial, is_short, leverage,
|
default_conf_usdt, ticker_usdt, limit_buy_order_old_partial, is_short, leverage,
|
||||||
open_trade, mocker
|
open_trade, mocker
|
||||||
) -> None:
|
) -> None:
|
||||||
|
# TODO-lev: use is_short or remove it
|
||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
open_trade.leverage = leverage
|
open_trade.leverage = leverage
|
||||||
limit_buy_order_old_partial['id'] = open_trade.open_order_id
|
limit_buy_order_old_partial['id'] = open_trade.open_order_id
|
||||||
@ -2700,6 +2703,8 @@ def test_check_handle_timedout_partial_except(
|
|||||||
rpc_mock = patch_RPCManager(mocker)
|
rpc_mock = patch_RPCManager(mocker)
|
||||||
limit_buy_order_old_partial_canceled['id'] = open_trade.open_order_id
|
limit_buy_order_old_partial_canceled['id'] = open_trade.open_order_id
|
||||||
limit_buy_order_old_partial['id'] = open_trade.open_order_id
|
limit_buy_order_old_partial['id'] = open_trade.open_order_id
|
||||||
|
if is_short:
|
||||||
|
limit_buy_order_old_partial['side'] = 'sell'
|
||||||
cancel_order_mock = MagicMock(return_value=limit_buy_order_old_partial_canceled)
|
cancel_order_mock = MagicMock(return_value=limit_buy_order_old_partial_canceled)
|
||||||
patch_exchange(mocker)
|
patch_exchange(mocker)
|
||||||
mocker.patch.multiple(
|
mocker.patch.multiple(
|
||||||
|
Loading…
Reference in New Issue
Block a user