2018-02-04 00:04:26 +00:00
|
|
|
"""
|
|
|
|
Unit test file for constants.py
|
|
|
|
"""
|
|
|
|
|
|
|
|
from freqtrade.constants import Constants
|
|
|
|
|
|
|
|
|
|
|
|
def test_constant_object() -> None:
|
|
|
|
"""
|
|
|
|
Test the Constants object has the mandatory Constants
|
|
|
|
"""
|
2018-02-07 04:22:17 +00:00
|
|
|
assert hasattr(Constants, 'CONF_SCHEMA')
|
|
|
|
assert hasattr(Constants, 'DYNAMIC_WHITELIST')
|
|
|
|
assert hasattr(Constants, 'PROCESS_THROTTLE_SECS')
|
|
|
|
assert hasattr(Constants, 'TICKER_INTERVAL')
|
|
|
|
assert hasattr(Constants, 'HYPEROPT_EPOCH')
|
|
|
|
assert hasattr(Constants, 'RETRY_TIMEOUT')
|
|
|
|
assert hasattr(Constants, 'DEFAULT_STRATEGY')
|
|
|
|
|
2018-02-04 00:04:26 +00:00
|
|
|
|
|
|
|
def test_conf_schema() -> None:
|
|
|
|
"""
|
|
|
|
Test the CONF_SCHEMA is from the right type
|
|
|
|
"""
|
|
|
|
constant = Constants()
|
|
|
|
assert isinstance(constant.CONF_SCHEMA, dict)
|