Improve login-mixin structure
This commit is contained in:
@@ -102,14 +102,14 @@ def test_log_cached(mocker, static_pl_conf, markets, tickers):
|
||||
logmock = MagicMock()
|
||||
# Assign starting whitelist
|
||||
pl = freqtrade.pairlists._pairlist_handlers[0]
|
||||
pl.log_once(logmock, 'Hello world')
|
||||
pl.log_once('Hello world', logmock)
|
||||
assert logmock.call_count == 1
|
||||
pl.log_once(logmock, 'Hello world')
|
||||
pl.log_once('Hello world', logmock)
|
||||
assert logmock.call_count == 1
|
||||
assert pl._log_cache.currsize == 1
|
||||
assert ('Hello world',) in pl._log_cache._Cache__data
|
||||
|
||||
pl.log_once(logmock, 'Hello world2')
|
||||
pl.log_once('Hello world2', logmock)
|
||||
assert logmock.call_count == 2
|
||||
assert pl._log_cache.currsize == 2
|
||||
|
||||
|
@@ -165,6 +165,7 @@ def test_LowProfitPairs(mocker, default_conf, fee, caplog):
|
||||
assert PairLocks.is_pair_locked('XRP/BTC')
|
||||
assert not PairLocks.is_global_lock()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("protectionconf,desc_expected,exception_expected", [
|
||||
({"method": "StoplossGuard", "lookback_period": 60, "trade_limit": 2},
|
||||
"[{'StoplossGuard': 'StoplossGuard - Frequent Stoploss Guard, "
|
||||
|
Reference in New Issue
Block a user