From f446b6b50a8ab36c9c9c32d6cddfd7b10a60cb38 Mon Sep 17 00:00:00 2001 From: Matthias Voppichler Date: Sun, 4 Mar 2018 20:19:00 +0100 Subject: [PATCH] fix unittest (mock health according to new type) --- freqtrade/tests/conftest.py | 60 +++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py index 7577e35e5..42e883d23 100644 --- a/freqtrade/tests/conftest.py +++ b/freqtrade/tests/conftest.py @@ -103,32 +103,40 @@ def ticker_sell_down(): @pytest.fixture def health(): - return MagicMock(return_value=[{ - 'Currency': 'BTC', - 'IsActive': True, - 'LastChecked': '2017-11-13T20:15:00.00', - 'Notice': None - }, { - 'Currency': 'ETH', - 'IsActive': True, - 'LastChecked': '2017-11-13T20:15:00.00', - 'Notice': None - }, { - 'Currency': 'TRST', - 'IsActive': True, - 'LastChecked': '2017-11-13T20:15:00.00', - 'Notice': None - }, { - 'Currency': 'SWT', - 'IsActive': True, - 'LastChecked': '2017-11-13T20:15:00.00', - 'Notice': None - }, { - 'Currency': 'BCC', - 'IsActive': False, - 'LastChecked': '2017-11-13T20:15:00.00', - 'Notice': None - }]) + return MagicMock(return_value={ + 'ETH/BTC': { + 'Currency': 'BTC', + 'base': 'ETH', + 'quote': 'BTC', + 'active': True, + 'LastChecked': '2017-11-13T20:15:00.00', + 'Notice': None + }, + 'TRST/BTC': { + 'Currency': 'TRST', + 'base': 'TRST', + 'quote': 'BTC', + 'active': True, + 'LastChecked': '2017-11-13T20:15:00.00', + 'Notice': None + }, + 'SWT/BTC': { + 'Currency': 'SWT', + 'base': 'SWT', + 'quote': 'BTC', + 'active': True, + 'LastChecked': '2017-11-13T20:15:00.00', + 'Notice': None + }, + 'BCC/BTC': { + 'Currency': 'BCC', + 'base': 'BCC', + 'quote': 'BTC', + 'active': False, + 'LastChecked': '2017-11-13T20:15:00.00', + 'Notice': None + } + }) @pytest.fixture