From b9f5b20347354e4c55ccd9fdb773f5e136ca169d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Wed, 21 Sep 2005 23:56:46 +0000 Subject: [PATCH] * test'i biraz gelistir --- tests/a.xml | 2 ++ tests/xmlfiletests.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/a.xml b/tests/a.xml index b4cfc2cc..4ca73e79 100644 --- a/tests/a.xml +++ b/tests/a.xml @@ -14,7 +14,9 @@ 18071976 AI + Baris Gurer + Caglar Meren diff --git a/tests/xmlfiletests.py b/tests/xmlfiletests.py index 37662bd1..189c9724 100644 --- a/tests/xmlfiletests.py +++ b/tests/xmlfiletests.py @@ -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')