2018-02-04 00:04:26 +00:00
|
|
|
"""
|
|
|
|
Unit test file for constants.py
|
|
|
|
"""
|
|
|
|
|
2018-04-02 14:42:53 +00:00
|
|
|
from freqtrade import constants
|
2018-02-04 00:04:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
def test_constant_object() -> None:
|
|
|
|
"""
|
|
|
|
Test the Constants object has the mandatory Constants
|
|
|
|
"""
|
2018-04-02 14:42:53 +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-07 04:22:17 +00:00
|
|
|
|
2018-02-04 00:04:26 +00:00
|
|
|
|
|
|
|
def test_conf_schema() -> None:
|
|
|
|
"""
|
|
|
|
Test the CONF_SCHEMA is from the right type
|
|
|
|
"""
|
2018-04-02 14:42:53 +00:00
|
|
|
assert isinstance(constants.CONF_SCHEMA, dict)
|