'The L{IProtocol} provider passed to L{Response.deliverBody} has its
C{dataReceived} method called with bytes received as part of the
response body.'

def test_dataReceived(self):

    bytes = []
    class ListConsumer(Protocol, ):
        def dataReceived(self, data):
            bytes.append(data)
    consumer = ListConsumer()
    response = justTransportResponse(StringTransport())
    response.deliverBody(consumer)
    response._bodyDataReceived('foo')
    self.assertEqual(bytes, ['foo'])
