'L{_IdentityTransferDecoder.noMoreData} raises L{_DataLoss} if it is
called and the content length is known but not enough bytes have been
delivered.'

def test_earlyConnectionLose(self):

    self.decoder.dataReceived(('x' * (self.contentLength - 1)))
    self.assertRaises(_DataLoss, self.decoder.noMoreData)
    self._verifyCallbacksUnreferenced(self.decoder)
