def test_entry_id(self): body = atom.dump_item(self.test_entity) xml_data = xml.etree.ElementTree.fromstring(body) ids = xml_data.findall(self.ns+'id') self.assertEquals(len(ids),1) id_tag = ids[0] self.assertEquals(id_tag.text, 'urn:uuid:46d55117-d2ff-4124-a184-5ff21a5c4c9b')
def test_no_link(self): body = atom.dump_item(self.test_entity, entity_links=False) xml_data = xml.etree.ElementTree.fromstring(body) links = xml_data.findall(self.ns+'link') self.assertEquals(len(links),0)
def test_dump_item(self): body = atom.dump_item(self.test_entity) self.assertTrue(len(body) > 0) xml_data = xml.etree.ElementTree.fromstring(body) self.assertEquals(xml_data.tag, self.ns+'entry')