'L{Response._bodyDataReceived} raises L{RuntimeError} if called after
L{Response._bodyDataFinished} and after L{Response.deliverBody}.'

def test_bodyDataReceivedAfterDeliveryFails(self):

    response = justTransportResponse(StringTransport())
    response._bodyDataFinished()
    response.deliverBody(Protocol())
    self.assertRaises(RuntimeError, response._bodyDataReceived, 'foo')
