From 7c99e6f0e6d8ffb4b2f256894a049a5e578aa259 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 19 Jan 2021 20:49:28 +0100 Subject: [PATCH] Avoid random test failure --- tests/plugins/test_pairlocks.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/plugins/test_pairlocks.py b/tests/plugins/test_pairlocks.py index bd103b21e..dfcbff0ed 100644 --- a/tests/plugins/test_pairlocks.py +++ b/tests/plugins/test_pairlocks.py @@ -11,11 +11,10 @@ from freqtrade.persistence.models import PairLock @pytest.mark.usefixtures("init_persistence") def test_PairLocks(use_db): PairLocks.timeframe = '5m' + PairLocks.use_db = use_db # No lock should be present if use_db: assert len(PairLock.query.all()) == 0 - else: - PairLocks.use_db = False assert PairLocks.use_db == use_db @@ -88,10 +87,9 @@ def test_PairLocks(use_db): def test_PairLocks_getlongestlock(use_db): PairLocks.timeframe = '5m' # No lock should be present + PairLocks.use_db = use_db if use_db: assert len(PairLock.query.all()) == 0 - else: - PairLocks.use_db = False assert PairLocks.use_db == use_db