def test_parse_category(self): incident = incident_binding.parseString(INCIDENT_CATEGORIES) self.assertTrue(incident is not None) self.assertEqual(2, len(incident.Categories.Category)) categories = incident.Categories.Category self.assertEqual('Foo', categories[0].valueOf_) self.assertEqual('Bar', categories[1].valueOf_)