From 7893ef6acc58b91961393007f47c151133d3426e Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 2 Feb 2018 14:41:30 -0500 Subject: [PATCH] Add test to ensure that all config.py properties are defined in the config schema --- util/config/test/test_schema.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 util/config/test/test_schema.py diff --git a/util/config/test/test_schema.py b/util/config/test/test_schema.py new file mode 100644 index 000000000..d7547a5cf --- /dev/null +++ b/util/config/test/test_schema.py @@ -0,0 +1,7 @@ +from config import DefaultConfig +from util.config.schema import CONFIG_SCHEMA + +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 +