diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index e5c2f353a..8ba9e82ef 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -286,7 +286,6 @@ class Exchange(object): """ Checks if ticker interval from config is a supported timeframe on the exchange """ - logger.warning("validate_timerames") if not hasattr(self._api, "timeframes"): # If timeframes is missing, the exchange probably has no fetchOHLCV method. # Therefore we also show that. diff --git a/freqtrade/tests/exchange/test_exchange.py b/freqtrade/tests/exchange/test_exchange.py index 48a8538a9..b74882ad4 100644 --- a/freqtrade/tests/exchange/test_exchange.py +++ b/freqtrade/tests/exchange/test_exchange.py @@ -396,6 +396,23 @@ def test_validate_timeframes_failed(default_conf, mocker): Exchange(default_conf) +def test_validate_timeframes_emulated_ohlcv(default_conf, mocker): + default_conf["ticker_interval"] = "3m" + api_mock = MagicMock() + id_mock = PropertyMock(return_value='test_exchange') + type(api_mock).id = id_mock + + # delete timeframes so magicmock does not autocreate it + del api_mock.timeframes + + mocker.patch('freqtrade.exchange.Exchange._init_ccxt', MagicMock(return_value=api_mock)) + mocker.patch('freqtrade.exchange.Exchange._load_markets', MagicMock(return_value={})) + mocker.patch('freqtrade.exchange.Exchange.validate_pairs', MagicMock()) + with pytest.raises(OperationalException, + match=r'This exchange (.*) does not have a `timeframes` attribute and*'): + Exchange(default_conf) + + def test_validate_timeframes_not_in_config(default_conf, mocker): del default_conf["ticker_interval"] api_mock = MagicMock() diff --git a/requirements-common.txt b/requirements-common.txt index 6913217ff..409c979b5 100644 --- a/requirements-common.txt +++ b/requirements-common.txt @@ -1,6 +1,6 @@ # requirements without requirements installable via conda # mainly used for Raspberry pi installs -ccxt==1.18.805 +ccxt==1.18.860 SQLAlchemy==1.3.5 python-telegram-bot==11.1.0 arrow==0.14.2 diff --git a/requirements-dev.txt b/requirements-dev.txt index 1232d4dd4..c360bc85e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,9 +5,9 @@ flake8==3.7.7 flake8-type-annotations==0.1.0 flake8-tidy-imports==2.0.0 -pytest==4.6.3 +pytest==5.0.0 pytest-mock==1.10.4 pytest-asyncio==0.10.0 pytest-cov==2.7.1 coveralls==1.8.1 -mypy==0.710 +mypy==0.711