'Tests choosing of correct response type
in case of Content-Type is empty but body contains text.'

def test_response_class_choosing_request(self):

    body = 'Some    plain    text\ndata    with    tabs DCTB     and    null    bytes\x00'
    def _test_type(response):
        self.assertEqual(type(response), TextResponse)
    request = Request(self.getURL('nocontenttype'), body=body)
    d = self.download_request(request, Spider('foo'))
    d.addCallback(_test_type)
    return d
