diff --git a/freqtrade/tests/conftest.py b/freqtrade/tests/conftest.py index 053b980f7..da48f5fc4 100644 --- a/freqtrade/tests/conftest.py +++ b/freqtrade/tests/conftest.py @@ -49,11 +49,11 @@ def default_conf(): "key": "key", "secret": "secret", "pair_whitelist": [ - "BTC_ETH", - "BTC_TKN", - "BTC_TRST", - "BTC_SWT", - "BTC_BCC" + "ETH/BTC", + "TKN/BTC", + "TRST/BTC", + "SWT/BTC", + "BCC/BTC" ] }, "telegram": { diff --git a/freqtrade/tests/optimize/test_optimize.py b/freqtrade/tests/optimize/test_optimize.py index e968084bc..21123e83f 100644 --- a/freqtrade/tests/optimize/test_optimize.py +++ b/freqtrade/tests/optimize/test_optimize.py @@ -6,7 +6,7 @@ import logging import uuid from shutil import copyfile from freqtrade import exchange, optimize -from freqtrade.exchange import Bittrex +from freqtrade.exchange import init as exchange_init from freqtrade.optimize.__init__ import make_testdata_path, download_pairs,\ download_backtesting_testdata, load_tickerdata_file, trim_tickerlist, file_dump_json @@ -49,7 +49,7 @@ def test_load_data_30min_ticker(default_conf, ticker_history, mocker, caplog): mocker.patch('freqtrade.optimize.get_ticker_history', return_value=ticker_history) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) file = 'freqtrade/tests/testdata/BTC_UNITTEST-30.json' _backup_file(file, copy_file=True) @@ -65,7 +65,7 @@ def test_load_data_5min_ticker(default_conf, ticker_history, mocker, caplog): mocker.patch('freqtrade.optimize.get_ticker_history', return_value=ticker_history) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) file = 'freqtrade/tests/testdata/BTC_ETH-5.json' _backup_file(file, copy_file=True) @@ -81,7 +81,7 @@ def test_load_data_1min_ticker(default_conf, ticker_history, mocker, caplog): mocker.patch('freqtrade.optimize.get_ticker_history', return_value=ticker_history) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) file = 'freqtrade/tests/testdata/BTC_ETH-1.json' _backup_file(file, copy_file=True) @@ -97,7 +97,7 @@ def test_load_data_with_new_pair_1min(default_conf, ticker_history, mocker, capl mocker.patch('freqtrade.optimize.get_ticker_history', return_value=ticker_history) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) file = 'freqtrade/tests/testdata/BTC_MEME-1.json' _backup_file(file) @@ -116,7 +116,7 @@ def test_testdata_path(): def test_download_pairs(default_conf, ticker_history, mocker): mocker.patch('freqtrade.optimize.__init__.get_ticker_history', return_value=ticker_history) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) file1_1 = 'freqtrade/tests/testdata/BTC_MEME-1.json' file1_5 = 'freqtrade/tests/testdata/BTC_MEME-5.json' @@ -158,7 +158,7 @@ def test_download_pairs_exception(default_conf, ticker_history, mocker, caplog): mocker.patch('freqtrade.optimize.__init__.download_backtesting_testdata', side_effect=BaseException('File Error')) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) file1_1 = 'freqtrade/tests/testdata/BTC_MEME-1.json' file1_5 = 'freqtrade/tests/testdata/BTC_MEME-5.json' @@ -177,7 +177,7 @@ def test_download_pairs_exception(default_conf, ticker_history, mocker, caplog): def test_download_backtesting_testdata(default_conf, ticker_history, mocker): mocker.patch('freqtrade.optimize.__init__.get_ticker_history', return_value=ticker_history) mocker.patch.dict('freqtrade.main._CONF', default_conf) - exchange._API = Bittrex({'key': '', 'secret': ''}) + exchange._API = exchange_init({'key': '', 'secret': ''}) # Download a 1 min ticker file file1 = 'freqtrade/tests/testdata/BTC_XEL-1.json'