From d93bb82193fed27d255bb5386e2c6b31c7702bca Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 12 Aug 2022 08:19:40 +0200 Subject: [PATCH] Add more Commits to failing test --- tests/plugins/test_protections.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/plugins/test_protections.py b/tests/plugins/test_protections.py index 07541735d..7a21b2ed6 100644 --- a/tests/plugins/test_protections.py +++ b/tests/plugins/test_protections.py @@ -305,6 +305,7 @@ def test_LowProfitPairs(mocker, default_conf, fee, caplog, only_per_side): min_ago_open=800, min_ago_close=450, profit_rate=0.9, )) + Trade.commit() # Not locked with 1 trade assert not freqtrade.protections.global_stop() assert not freqtrade.protections.stop_per_pair('XRP/BTC') @@ -316,6 +317,7 @@ def test_LowProfitPairs(mocker, default_conf, fee, caplog, only_per_side): min_ago_open=200, min_ago_close=120, profit_rate=0.9, )) + Trade.commit() # Not locked with 1 trade (first trade is outside of lookback_period) assert not freqtrade.protections.global_stop() assert not freqtrade.protections.stop_per_pair('XRP/BTC') @@ -327,6 +329,7 @@ def test_LowProfitPairs(mocker, default_conf, fee, caplog, only_per_side): 'XRP/BTC', fee.return_value, False, exit_reason=ExitType.ROI.value, min_ago_open=20, min_ago_close=10, profit_rate=1.15, is_short=True )) + Trade.commit() assert freqtrade.protections.stop_per_pair('XRP/BTC') != only_per_side assert not PairLocks.is_pair_locked('XRP/BTC', side='*') assert PairLocks.is_pair_locked('XRP/BTC', side='long') == only_per_side