Specify JsonValidatorversion explicitly
without doing that, it exclusiveMaximum raises an exception as jsonschema defaults to the latest version (Draft6) which changes behaviour of this property. fixes #1233
This commit is contained in:
parent
616ca0237e
commit
0c10719037
@ -275,7 +275,7 @@ class Configuration(object):
|
|||||||
:return: Returns the config if valid, otherwise throw an exception
|
:return: Returns the config if valid, otherwise throw an exception
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
validate(conf, constants.CONF_SCHEMA)
|
validate(conf, constants.CONF_SCHEMA, Draft4Validator)
|
||||||
return conf
|
return conf
|
||||||
except ValidationError as exception:
|
except ValidationError as exception:
|
||||||
logger.critical(
|
logger.critical(
|
||||||
|
@ -6,7 +6,7 @@ import logging
|
|||||||
from unittest.mock import MagicMock
|
from unittest.mock import MagicMock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from jsonschema import validate, ValidationError
|
from jsonschema import validate, ValidationError, Draft4Validator
|
||||||
|
|
||||||
from freqtrade import constants
|
from freqtrade import constants
|
||||||
from freqtrade import OperationalException
|
from freqtrade import OperationalException
|
||||||
@ -486,4 +486,4 @@ def test_load_config_warn_forcebuy(default_conf, mocker, caplog) -> None:
|
|||||||
|
|
||||||
|
|
||||||
def test_validate_default_conf(default_conf) -> None:
|
def test_validate_default_conf(default_conf) -> None:
|
||||||
validate(default_conf, constants.CONF_SCHEMA)
|
validate(default_conf, constants.CONF_SCHEMA, Draft4Validator)
|
||||||
|
Loading…
Reference in New Issue
Block a user