예제 #1
0
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)
예제 #2
0
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"