[Zope3-checkins] CVS: Packages/ZConfig/tests - test_schema.py:1.1.2.15
Fred L. Drake, Jr.
fred@zope.com
Fri, 13 Dec 2002 12:13:00 -0500
Update of /cvs-repository/Packages/ZConfig/tests
In directory cvs.zope.org:/tmp/cvs-serv14289/tests
Modified Files:
Tag: zconfig-schema-devel-branch
test_schema.py
Log Message:
Reflect attribute name changes from the DTD.
=== Packages/ZConfig/tests/test_schema.py 1.1.2.14 => 1.1.2.15 ===
--- Packages/ZConfig/tests/test_schema.py:1.1.2.14 Fri Dec 13 10:58:58 2002
+++ Packages/ZConfig/tests/test_schema.py Fri Dec 13 12:12:59 2002
@@ -70,15 +70,15 @@
dtname = __name__ + ".uppercase"
schema = self.load_schema_text(
"<schema>"
- " <key name='a' type='%s'/>"
- " <key name='b' type='%s'>"
+ " <key name='a' datatype='%s'/>"
+ " <key name='b' datatype='%s'>"
" <default>abc</default>"
" </key>"
- " <key name='c' type='%s' maxOccurs='3'>"
+ " <key name='c' datatype='%s' maxOccurs='3'>"
" <default>abc</default>"
" <default>abc</default>"
" </key>"
- " <key name='d' type='%s' maxOccurs='3'>"
+ " <key name='d' datatype='%s' maxOccurs='3'>"
" <default>not</default>"
" <default>lower</default>"
" <default>case</default>"
@@ -98,9 +98,9 @@
def test_app_sectiontype(self):
schema = self.load_schema_text(
- "<schema type='%s.appsection' prefix='%s'>"
- " <sectiontype name='foo' type='.appsection'>"
- " <key name='sample' type='integer'>"
+ "<schema datatype='%s.appsection' prefix='%s'>"
+ " <sectiontype type='foo' datatype='.appsection'>"
+ " <key name='sample' datatype='integer'>"
" <default>345</default>"
" </key>"
" </sectiontype>"
@@ -123,7 +123,7 @@
def test_empty_sections(self):
schema = self.load_schema_text(
"<schema>"
- " <sectiontype name='section'/>"
+ " <sectiontype type='section'/>"
" <section type='section' name='s1'/>"
" <section type='section' name='s2'/>"
"</schema>")
@@ -137,14 +137,14 @@
def test_deeply_nested_sections(self):
schema = self.load_schema_text(
"<schema>"
- " <sectiontype name='type1'>"
+ " <sectiontype type='type1'>"
" <key name='key'><default>type1-value</default></key>"
" </sectiontype>"
- " <sectiontype name='type2'>"
+ " <sectiontype type='type2'>"
" <key name='key'><default>type2-value</default></key>"
" <section name='sect' type='type1'/>"
" </sectiontype>"
- " <sectiontype name='type3'>"
+ " <sectiontype type='type3'>"
" <key name='key'><default>type3-value</default></key>"
" <section name='sect' type='type2'/>"
" </sectiontype>"
@@ -170,11 +170,11 @@
schema = self.load_schema_text(
"<schema>"
" <key name='a' minOccurs='2' maxOccurs='5' />"
- " <key name='b' minOccurs='2' maxOccurs='2' type='integer'>"
+ " <key name='b' minOccurs='2' maxOccurs='2' datatype='integer'>"
" <default>1</default>"
" <default>2</default>"
" </key>"
- " <key name='c' minOccurs='2' maxOccurs='3' type='integer'>"
+ " <key name='c' minOccurs='2' maxOccurs='3' datatype='integer'>"
" <default>3</default>"
" <default>4</default>"
" <default>5</default>"
@@ -196,8 +196,8 @@
def test_duplicate_section_names(self):
schema = self.load_schema_text(
"<schema>"
- " <sectiontype name='sect'/>"
- " <sectiontype name='nesting'>"
+ " <sectiontype type='sect'/>"
+ " <sectiontype type='nesting'>"
" <section name='a' type='sect'/>"
" </sectiontype>"
" <section name='a' type='nesting'/>"
@@ -213,11 +213,11 @@
def test_load_sectiongroup(self):
schema = self.load_schema_text(
"<schema>"
- " <sectiongroup name='group'>"
- " <sectiontype name='t1'>"
+ " <sectiongroup type='group'>"
+ " <sectiontype type='t1'>"
" <key name='k1'><default>default1</default></key>"
" </sectiontype>"
- " <sectiontype name='t2'>"
+ " <sectiontype type='t2'>"
" <key name='k2'><default>default2</default></key>"
" </sectiontype>"
" </sectiongroup>"