* test'i biraz gelistir

This commit is contained in:
Eray Özkural
2005-09-21 23:56:46 +00:00
parent d064e8a940
commit b9f5b20347
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -14,7 +14,9 @@
<BirthDate>18071976</BirthDate>
<Interest>AI</Interest>
<CodesWith>
<Person>Baris</Person>
<Person>Gurer</Person>
<Person>Caglar</Person>
<Person>Meren</Person>
</CodesWith>
</OtherInfo>
+3 -1
View File
@@ -29,7 +29,8 @@ class XmlFileTestCase(unittest.TestCase):
class OtherInfo:
__metaclass__ = xmlfile.autoxml
t_BirthDate = [types.StringType, xmlfile.mandatory]
t_Interest = [types.StringType, xmlfile.mandatory]
t_Interest = [types.StringType, xmlfile.optional]
t_CodesWith = [ [types.StringType], xmlfile.optional, 'CodesWith/Person']
class A:
__metaclass__ = xmlfile.autoxml
@@ -39,6 +40,7 @@ class XmlFileTestCase(unittest.TestCase):
a_href = [types.StringType, xmlfile.mandatory]
t_Projects = [ [types.StringType], xmlfile.mandatory, 'Projects/Project']
t_OtherInfo = [ OtherInfo, xmlfile.optional ]
a = A()
self.assertEqual(a.href, None)
dom = mdom.parse('tests/a.xml')