From 838bd5824ea85b5840bfe3f7686e01862f7b33d2 Mon Sep 17 00:00:00 2001 From: enenn Date: Mon, 9 Apr 2018 21:15:47 +0200 Subject: [PATCH] Mock validate_pairs --- freqtrade/tests/optimize/test_backtesting.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/freqtrade/tests/optimize/test_backtesting.py b/freqtrade/tests/optimize/test_backtesting.py index 014c5d65a..d4f8b86aa 100644 --- a/freqtrade/tests/optimize/test_backtesting.py +++ b/freqtrade/tests/optimize/test_backtesting.py @@ -598,13 +598,15 @@ def test_backtest_record(init_backtesting, default_conf, mocker): def test_backtest_start_live(init_backtesting, default_conf, mocker, caplog): - default_conf['exchange']['pair_whitelist'] = ['UNITTEST/BTC'] + conf = deepcopy(default_conf) + conf['exchange']['pair_whitelist'] = ['UNITTEST/BTC'] mocker.patch('freqtrade.exchange.get_ticker_history', new=lambda n, i: _load_pair_as_ticks(n, i)) + mocker.patch('freqtrade.exchange.validate_pairs', MagicMock()) mocker.patch('freqtrade.optimize.backtesting.Backtesting.backtest', MagicMock()) mocker.patch('freqtrade.optimize.backtesting.Backtesting._generate_text_table', MagicMock()) mocker.patch('freqtrade.configuration.open', mocker.mock_open( - read_data=json.dumps(default_conf) + read_data=json.dumps(conf) )) args = MagicMock()