mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
chore: use log_has_re for test log assertion
This commit is contained in:
@@ -701,11 +701,11 @@ def test_process_trade_creation(
|
||||
assert pytest.approx(trade.amount) == 0
|
||||
assert pytest.approx(trade.amount_requested) == 60 / ticker_usdt.return_value[ticker_side]
|
||||
|
||||
expected_log = (
|
||||
assert log_has_re(
|
||||
f"{'Short' if is_short else 'Long'} signal found: about create a new trade for ETH/USDT "
|
||||
"with stake_amount: 60.0"
|
||||
r"with stake_amount: 60.0 and price: .*",
|
||||
caplog,
|
||||
)
|
||||
assert expected_log in caplog.text
|
||||
mocker.patch("freqtrade.freqtradebot.FreqtradeBot._check_and_execute_exit")
|
||||
|
||||
# Fill trade.
|
||||
|
||||
Reference in New Issue
Block a user