def test_invalid_xml(file):
    """Testing several problematic XML files, none should be formatted
    and none should make HTTPie to crash.
    """
    xml_data = file.read_text(encoding=UTF8)
    responses.add(
        responses.GET,
        DUMMY_URL,
        body=xml_data,
        content_type='application/xml',
    )

    # No formatting done, data is simply printed as-is.
    r = http(DUMMY_URL)
    assert xml_data in r
Testing several problematic XML files, none should be formatted
    and none should make HTTPie to crash.
    
tests/test_xml.py