'If wsgi.input.read() raises an exception while trying to read() the
POST, the exception should be identifiable (not a generic IOError).'

def test_POST_connection_error(self):

    class ExplodingBytesIO(BytesIO, ):
        def read(self, len=0):
            raise IOError(u'kaboom!')
    payload = 'name=value'
    request = WSGIRequest({u'REQUEST_METHOD': u'POST', u'CONTENT_TYPE': u'application/x-www-form-urlencoded', u'CONTENT_LENGTH': len(payload), u'wsgi.input': ExplodingBytesIO(payload)})
    with self.assertRaises(UnreadablePostError):
        request.body
