def test_person_feed_uses_utf8_encoding(records, xml_records, E): b = BytesIO() xml = E.records(xml_records[1]) r = records[1]['person'].copy() r.update(records[1]['orcid']) r.update(records[1]['dlc']) with person_feed(b) as f: f(r) assert b.getvalue() == ET.tostring(xml, encoding="UTF-8", xml_declaration=True)
def test_person_feed_uses_namespace(): b = BytesIO() with person_feed(b): pass root = ET.fromstring(b.getvalue()) assert root.tag == "{http://www.symplectic.co.uk/hrimporter}records"