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

Fred L. Drake, Jr. fred@zope.com
Fri, 13 Dec 2002 16:09:42 -0500


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

Modified Files:
      Tag: zconfig-schema-devel-branch
	test_schema.py 
Log Message:
Reach into the implementation to make sure the handlers are properly
stored, and in the right order to support inner-to-outer calling.


=== Packages/ZConfig/tests/test_schema.py 1.1.2.18 => 1.1.2.19 ===
--- Packages/ZConfig/tests/test_schema.py:1.1.2.18	Fri Dec 13 15:38:58 2002
+++ Packages/ZConfig/tests/test_schema.py	Fri Dec 13 16:09:41 2002
@@ -171,8 +171,8 @@
 
     def test_multivalued_keys(self):
         schema = self.load_schema_text(
-            "<schema>"
-            "  <key name='a' minOccurs='2' maxOccurs='5' />"
+            "<schema handler='def'>"
+            "  <key name='a' minOccurs='2' maxOccurs='5' handler='abc' />"
             "  <key name='b' minOccurs='2' maxOccurs='2' datatype='integer'>"
             "    <default>1</default>"
             "    <default>2</default>"
@@ -189,8 +189,10 @@
                                      "a bar\n"
                                      "c 41\n"
                                      "c 42\n"
-                                     "c 43\n"
-                                     )
+                                     "c 43\n",
+                                     num_handlers=2)
+        self.assertEqual(self.handlers._handlers,
+                         [('abc', ['foo', 'bar']), ('def', conf)])
         self.assertEqual(conf.a, ['foo', 'bar'])
         self.assertEqual(conf.b, [1, 2])
         self.assertEqual(conf.c, [41, 42, 43])