[Zope-Checkins] CVS: Packages/ZConfig/tests - test_schema.py:1.1.2.27
Fred L. Drake, Jr.
fred@zope.com
Thu, 19 Dec 2002 10:23:11 -0500
Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv17524/tests
Modified Files:
Tag: zconfig-schema-devel-branch
test_schema.py
Log Message:
Basic support for supporting arbitrary keys as <key name="+".../>
(also multikeys).
=== Packages/ZConfig/tests/test_schema.py 1.1.2.26 => 1.1.2.27 ===
--- Packages/ZConfig/tests/test_schema.py:1.1.2.26 Thu Dec 19 10:18:30 2002
+++ Packages/ZConfig/tests/test_schema.py Thu Dec 19 10:23:11 2002
@@ -314,6 +314,14 @@
conf = self.load_config_text(schema, "some-key 42\n some-key 43")
self.assertEqual(conf.keymap, {'some-key': [42, 43]})
+ def test_arbitrary_key_bad_schema(self):
+ self.assertRaises(ZConfig.ConfigurationError,
+ self.load_config_text,
+ "<schema>"
+ " <key name='+' attribute='attr1'/>"
+ " <key name='+' attribute='attr2'/>"
+ "</schema>")
+
# datatype tests
def test_datatype_basickey(self):