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

@@ -210,7 +210,7 @@ def get_ticker(pair: str, refresh: Optional[bool] = True) -> dict:
@cached(TTLCache(maxsize=100, ttl=30))
def get_ticker_history(pair: str, tick_interval: str) -> List[Dict]:
if not _API.hasFetchOHLCV():
if 'fetchOHLCV' not in _API.has or not _API.has['fetchOHLCV']:
raise OperationalException(
'Exhange {} does not support fetching historical candlestick data.'.format(_API.name)
)