aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/config/tests/test_validator.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/config/tests/test_validator.py')
-rw-r--r--src/mailman_pgp/config/tests/test_validator.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mailman_pgp/config/tests/test_validator.py b/src/mailman_pgp/config/tests/test_validator.py
index 15b0b62..d24dfc7 100644
--- a/src/mailman_pgp/config/tests/test_validator.py
+++ b/src/mailman_pgp/config/tests/test_validator.py
@@ -102,3 +102,16 @@ class TestValidator(TestCase):
""")
validator.validate(valid)
self.assertRaises(ValueError, validator.validate, invalid)
+
+ def test_none(self):
+ schema = """\
+ [test]
+ test_option:
+ """
+ validator = ConfigValidator(schema)
+ cfg = Config()
+ cfg.read_string("""\
+ [test]
+ test_option: something
+ """)
+ self.assertRaises(ValueError, validator.validate, cfg)