'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('kaboom!')
    payload = 'name=value'
    request = WSGIRequest({'REQUEST_METHOD': 'POST', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CONTENT_LENGTH': len(payload), 'wsgi.input': ExplodingBytesIO(payload)})
    with self.assertRaises(UnreadablePostError):
        request.body
