summaryrefslogtreecommitdiff
path: root/src/leap/base/tests/test_config.py
diff options
context:
space:
mode:
authorkali <kali@leap.se>2012-09-24 22:21:50 +0900
committerkali <kali@leap.se>2012-09-24 22:21:50 +0900
commit30570bd89c04a56b35b91a0bc1d5fc00bb6ad266 (patch)
tree10364a8c906b34474f0e453fd5a3b29c4d6fba92 /src/leap/base/tests/test_config.py
parent5c32cc7b5e00853b3cc28b5003b92ab009418dff (diff)
add schema to JSONLeapConfig classes
and a jsonvalidate function too, that calls to jsonchemea.validate(self, data) with self.schema We're using the specs to both purposes now: * providing a type casting system for our config options (work in progress for the type casting) * json schema validation
Diffstat (limited to 'src/leap/base/tests/test_config.py')
-rw-r--r--src/leap/base/tests/test_config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/leap/base/tests/test_config.py b/src/leap/base/tests/test_config.py
index bede5ea1..d03149b2 100644
--- a/src/leap/base/tests/test_config.py
+++ b/src/leap/base/tests/test_config.py
@@ -38,14 +38,14 @@ class JSONLeapConfigTest(BaseLeapTest):
class DummyTestConfig(config.JSONLeapConfig):
__metaclass__ = config.MetaConfigWithSpec
- spec = {}
+ spec = {'properties': {}}
with self.assertRaises(exceptions.ImproperlyConfigured) as exc:
DummyTestConfig()
exc.startswith("missing slug")
class DummyTestConfig(config.JSONLeapConfig):
__metaclass__ = config.MetaConfigWithSpec
- spec = {}
+ spec = {'properties': {}}
slug = "foo"
DummyTestConfig()