Improve login-mixin structure

This commit is contained in:
Matthias
2020-11-22 11:49:41 +01:00
parent 8d9c66a638
commit 8f958ef723
14 changed files with 35 additions and 35 deletions

View File

@@ -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