Fill out schema and schema whitelist
This commit is contained in:
parent
7893ef6acc
commit
5490e64669
3 changed files with 262 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
from config import DefaultConfig
|
||||
from util.config.schema import CONFIG_SCHEMA
|
||||
from util.config.schema import CONFIG_SCHEMA, INTERNAL_ONLY_PROPERTIES
|
||||
|
||||
def test_ensure_schema_defines_all_fields():
|
||||
for key in vars(DefaultConfig):
|
||||
assert key in CONFIG_SCHEMA['properties'], "Property `%s` is missing from config schema" % key
|
||||
|
||||
has_key = key in CONFIG_SCHEMA['properties'] or key in INTERNAL_ONLY_PROPERTIES
|
||||
assert has_key, "Property `%s` is missing from config schema" % key
|
||||
|
|
Reference in a new issue