'L{_ChunkedTransferDecoder.noMoreData} raises L{_DataLoss} if it is
called and the end of the last trailer has not yet been received.'

def test_earlyConnectionLose(self):

    parser = http._ChunkedTransferDecoder(None, (lambda bytes: None))
    parser.dataReceived('0\r\n\r')
    exc = self.assertRaises(_DataLoss, parser.noMoreData)
    self.assertEqual(str(exc), "Chunked    decoder    in    'TRAILER'    state,    still    expecting    more    data    to    get    to    'FINISHED'    state.")
