Пример #1
0
 def test_to_dict(self):
     doc = BioDesDoc()
     doc.from_url(os.path.join(this_dir, 'bio.xml'))
     d = doc.to_dict()
     assert 'geboortedatum' in d, d
     assert doc.get_value('geboortedatum')
     self.assertEqual(type(doc.get_value('geboortedatum')), type(u''))
Пример #2
0
 def test_get_value(self):
     doc = BioDesDoc()
     doc.from_url(os.path.join(this_dir, 'bio.xml'))
     value = [n.volledige_naam() for n in doc.get_value('namen')]
     should_be = ['C. van Heynsbergen']
     self.failUnlessEqual(value, should_be)