Mock ccxt.exchange.has as property instead of method for tests.

This commit is contained in:
enenn
2018-02-09 22:43:32 +01:00
parent a5f179c18e
commit f2fa75a4ec
2 changed files with 3 additions and 2 deletions

View File

@@ -313,7 +313,8 @@ def test_get_ticker_history(default_conf, mocker):
5, # volume (in quote currency)
]
]
api_mock.hasFetchOHLVC = MagicMock(return_value=True)
has = PropertyMock(return_value={'fetchOHLCV': True})
type(api_mock).has = has
api_mock.fetch_ohlcv = MagicMock(return_value=tick)
mocker.patch('freqtrade.exchange._API', api_mock)