def test_xml_utilities():
    x = _parse_xml(b'<?xml version="1.0" encoding="UTF-8" ?>\n        <multistatus xmlns="DAV:">\n            <response>\n                <propstat>\n                    <status>HTTP/1.1 404 Not Found</status>\n                    <prop>\n                        <getcontenttype/>\n                    </prop>\n                </propstat>\n                <propstat>\n                    <prop>\n                        <resourcetype>\n                            <collection/>\n                        </resourcetype>\n                    </prop>\n                </propstat>\n            </response>\n        </multistatus>\n    ')
    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)
def test_xml_utilities():
    x = _parse_xml(b'<?xml version="1.0" encoding="UTF-8" ?>\n        <multistatus xmlns="DAV:">\n            <response>\n                <propstat>\n                    <status>HTTP/1.1 404 Not Found</status>\n                    <prop>\n                        <getcontenttype/>\n                    </prop>\n                </propstat>\n                <propstat>\n                    <prop>\n                        <resourcetype>\n                            <collection/>\n                        </resourcetype>\n                    </prop>\n                </propstat>\n            </response>\n        </multistatus>\n    ')
    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)