from vdirsyncer.storage.dav import _merge_xml, _parse_xml def test_xml_utilities(): x = _parse_xml(''' HTTP/1.1 404 Not Found ''') response = x.find('{DAV:}response') props = _merge_xml(response.findall('{DAV:}propstat/{DAV:}prop')) assert props.find('{DAV:}resourcetype/{DAV:}collection') is not None assert props.find('{DAV:}getcontenttype') is not None