def test_bodyDataReceivedAfterDeliveryFails(self):
        response = justTransportResponse(StringTransport())
        response._bodyDataFinished()
        response.deliverBody(Protocol())
        self.assertRaises(RuntimeError, response._bodyDataReceived, 'foo')
Waits for an occurrence of the specified event for a given session.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/ResponseTests.test_bodyDataReceivedAfterDeliveryFails--crossover with--dataset/ETHPy150Open hgrecco/pyvisa/pyvisa/highlevel.py/VisaLibraryBase.wait_on_event