[Zope-Checkins] CVS: Packages/ZConfig/tests - test_schema.py:1.1.2.4
Fred L. Drake, Jr.
fred@zope.com
Wed, 11 Dec 2002 17:26:49 -0500
Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv7796
Modified Files:
Tag: zconfig-schema-devel-branch
test_schema.py
Log Message:
Test more legal multi-valued key situations.
=== Packages/ZConfig/tests/test_schema.py 1.1.2.3 => 1.1.2.4 ===
--- Packages/ZConfig/tests/test_schema.py:1.1.2.3 Wed Dec 11 16:25:19 2002
+++ Packages/ZConfig/tests/test_schema.py Wed Dec 11 17:26:49 2002
@@ -56,17 +56,28 @@
schema = self.load_schema_text(
"<schema>"
" <key name='a' minOccurs='2' maxOccurs='5' />"
- " <key name='b' minOccurs='2' maxOccurs='2' >"
- " <default>first</default>"
- " <default>second</default>"
+ " <key name='b' minOccurs='2' maxOccurs='2' type='integer'>"
+ " <default>1</default>"
+ " <default>2</default>"
" </key>"
+ " <key name='c' minOccurs='2' maxOccurs='3' type='integer'>"
+ " <default>3</default>"
+ " <default>4</default>"
+ " <default>5</default>"
+ " </key>"
+ " <key name='d' maxOccurs='4' />"
"</schema>")
conf = self.load_config_text(schema,
"a foo\n"
"a bar\n"
+ "c 41\n"
+ "c 42\n"
+ "c 43\n"
)
self.assertEqual(conf.a, ['foo', 'bar'])
- self.assertEqual(conf.b, ['first', 'second'])
+ self.assertEqual(conf.b, [1, 2])
+ self.assertEqual(conf.c, [41, 42, 43])
+ self.assertEqual(conf.d, [])
# utilities