def test_earlyConnectionLose(self):
        """
        L{_IdentityTransferDecoder.noMoreData} raises L{_DataLoss} if it is
        called and the content length is known but not enough bytes have been
        delivered.
        """
        self.decoder.dataReceived('x' * (self.contentLength - 1))
        self.assertRaises(_DataLoss, self.decoder.noMoreData)
        self._verifyCallbacksUnreferenced(self.decoder)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_http.py/IdentityTransferEncodingTests.test_earlyConnectionLose/original