[Zodb-checkins] CVS: Packages/ZConfig/tests - test_schema.py:1.5

Fred L. Drake, Jr. fred@zope.com
Mon, 6 Jan 2003 16:07:44 -0500


Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv828/tests

Modified Files:
	test_schema.py 
Log Message:
Keep section names flexible when concrete names are not specified in
the schema.


=== Packages/ZConfig/tests/test_schema.py 1.4 => 1.5 ===
--- Packages/ZConfig/tests/test_schema.py:1.4	Mon Jan  6 14:35:43 2003
+++ Packages/ZConfig/tests/test_schema.py	Mon Jan  6 16:07:40 2003
@@ -558,6 +558,16 @@
         else:
             self.fail("expected ZConfig.DataConversionError")
 
+    def test_numeric_section_name(self):
+        schema = self.load_schema_text("<schema>"
+                                       "  <sectiontype type='sect'/>"
+                                       "  <multisection name='*' type='sect'"
+                                       "                attribute='things'/>"
+                                       "</schema>")
+        conf = self.load_config_text(schema,
+                                     "<sect 1 />")
+        self.assertEqual(len(conf.things), 1)
+
 
 def test_suite():
     return unittest.makeSuite(SchemaTestCase)