Merge branch 'develop' into feature/proceed-exit-while-open-order
This commit is contained in:
@@ -3484,16 +3484,17 @@ def test_locked_pairs(
|
||||
exit_check=ExitCheckTuple(exit_type=ExitType.STOP_LOSS),
|
||||
)
|
||||
trade.close(ticker_usdt_sell_down()["bid"])
|
||||
assert freqtrade.strategy.is_pair_locked(trade.pair, side="*")
|
||||
assert not freqtrade.strategy.is_pair_locked(trade.pair, side="*")
|
||||
# Both sides are locked
|
||||
assert freqtrade.strategy.is_pair_locked(trade.pair, side="long")
|
||||
assert freqtrade.strategy.is_pair_locked(trade.pair, side="short")
|
||||
assert freqtrade.strategy.is_pair_locked(trade.pair, side="long") != is_short
|
||||
assert freqtrade.strategy.is_pair_locked(trade.pair, side="short") == is_short
|
||||
|
||||
# reinit - should buy other pair.
|
||||
caplog.clear()
|
||||
freqtrade.enter_positions()
|
||||
direction = "short" if is_short else "long"
|
||||
|
||||
assert log_has_re(rf"Pair {trade.pair} \* is locked.*", caplog)
|
||||
assert log_has_re(rf"Pair {trade.pair} {direction} is locked.*", caplog)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("is_short", [False, True])
|
||||
@@ -3845,7 +3846,7 @@ def test_get_real_amount_no_trade(default_conf_usdt, buy_order_fee, caplog, mock
|
||||
assert log_has(
|
||||
"Applying fee on amount for Trade(id=None, pair=LTC/ETH, amount=8.00000000, "
|
||||
"is_short=False, leverage=1.0, open_rate=0.24544100, open_since=closed) failed: "
|
||||
"myTrade-Dict empty found",
|
||||
"myTrade-dict empty found",
|
||||
caplog,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user