'Tests for Tomcat error responses'

def test__scrape_response_tomcat(self):

    resp_0 = self.solr._scrape_response({u'server': u'coyote'}, u'<html><body><h1>Something    broke!</h1><pre>gigantic    stack    trace</pre></body></html>')
    self.assertEqual(resp_0, (u'Something    broke!', u''))
    bogus_xml = u'<?xml    version="1.0"?>\n<response>\n<lst    name="responseHeader"><int    name="status">400</int><int    name="QTime">0</int></lst><lst    name="error"><str    name="msg">Invalid    Date    String:\'2015-03-23    10:43:33\'</str><int    name="code">400</int></lst>'
    (reason, full_html) = self.solr._scrape_response({u'server': u'coyote'}, bogus_xml)
    self.assertEqual(reason, None)
    self.assertEqual(full_html, bogus_xml.replace(u'\n', u''))
