def test_errorMessageOnConnectionLostBeforeGenerationFailedDoesNotConfuse(self):
        errors = []
        log.addObserver(errors.append)
        self.addCleanup(log.removeObserver, errors.append)

        def check(ignore):
            error = errors[0]
            self.assertEqual(error[u'why'],
                              u'Error writing request, but not in valid state '
                              u'to finalize request: CONNECTION_LOST')

        return self.test_connectionLostDuringRequestGeneration(
            'errback').addCallback(check)
If the request passed to L{HTTP11ClientProtocol} finished generation
dataset/ETHPy150Open twisted/twisted/twisted/web/test/test_newclient.py/HTTP11ClientProtocolTests.test_errorMessageOnConnectionLostBeforeGenerationFailedDoesNotConfuse