mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-02 10:03:05 +00:00
chore: fix RUF043 violations
This commit is contained in:
@@ -393,7 +393,7 @@ def test_rpc_delete_trade(mocker, default_conf, fee, markets, caplog, is_short):
|
||||
freqtradebot.strategy.order_types["stoploss_on_exchange"] = True
|
||||
create_mock_trades(fee, is_short)
|
||||
rpc = RPC(freqtradebot)
|
||||
with pytest.raises(RPCException, match="Trade with id '200' not found."):
|
||||
with pytest.raises(RPCException, match=r"Trade with id '200' not found\."):
|
||||
rpc._rpc_delete("200")
|
||||
|
||||
trades = Trade.session.scalars(select(Trade)).all()
|
||||
@@ -1204,7 +1204,7 @@ def test_rpc_force_entry(mocker, default_conf, ticker, fee, limit_buy_order_open
|
||||
patch_get_signal(freqtradebot)
|
||||
rpc = RPC(freqtradebot)
|
||||
pair = "ETH/BTC"
|
||||
with pytest.raises(RPCException, match="Maximum number of trades is reached."):
|
||||
with pytest.raises(RPCException, match=r"Maximum number of trades is reached\."):
|
||||
rpc._rpc_force_entry(pair, None)
|
||||
freqtradebot.config["max_open_trades"] = 5
|
||||
|
||||
@@ -1286,7 +1286,7 @@ def test_rpc_force_entry_wrong_mode(mocker, default_conf) -> None:
|
||||
patch_get_signal(freqtradebot)
|
||||
rpc = RPC(freqtradebot)
|
||||
pair = "ETH/BTC"
|
||||
with pytest.raises(RPCException, match="Can't go short on Spot markets."):
|
||||
with pytest.raises(RPCException, match=r"Can't go short on Spot markets\."):
|
||||
rpc._rpc_force_entry(pair, None, order_side=SignalDirection.SHORT)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user