Add testcase where ticker_interval is not in the configuration
This commit is contained in:
parent
3f6e9cd28f
commit
570d27a0c4
@ -157,6 +157,22 @@ def test_validate_timeframes_failed(default_conf, mocker):
|
|||||||
Exchange(default_conf)
|
Exchange(default_conf)
|
||||||
|
|
||||||
|
|
||||||
|
def test_validate_timeframes_not_in_config(default_conf, mocker):
|
||||||
|
del default_conf["ticker_interval"]
|
||||||
|
api_mock = MagicMock()
|
||||||
|
id_mock = PropertyMock(return_value='test_exchange')
|
||||||
|
type(api_mock).id = id_mock
|
||||||
|
timeframes = PropertyMock(return_value={'1m': '1m',
|
||||||
|
'5m': '5m',
|
||||||
|
'15m': '15m',
|
||||||
|
'1h': '1h'})
|
||||||
|
type(api_mock).timeframes = timeframes
|
||||||
|
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange._init_ccxt', MagicMock(return_value=api_mock))
|
||||||
|
mocker.patch('freqtrade.exchange.Exchange.validate_pairs', MagicMock())
|
||||||
|
Exchange(default_conf)
|
||||||
|
|
||||||
|
|
||||||
def test_exchangehas(default_conf, mocker):
|
def test_exchangehas(default_conf, mocker):
|
||||||
exchange = get_patched_exchange(mocker, default_conf)
|
exchange = get_patched_exchange(mocker, default_conf)
|
||||||
assert not exchange.exchange_has('ASDFASDF')
|
assert not exchange.exchange_has('ASDFASDF')
|
||||||
|
Loading…
Reference in New Issue
Block a user