'Calling L{client.readBody} with a transport that does not implement
L{twisted.internet.interfaces.ITCPTransport} produces a deprecation
warning, but no exception when cancelling.'

def test_deprecatedTransport(self):

    response = DummyResponse(transportFactory=StringTransport)
    response.transport.abortConnection = None
    d = self.assertWarns(DeprecationWarning, 'Using    readBody    with    a    transport    that    does    not    have    an    abortConnection    method', __file__, (lambda : client.readBody(response)))
    d.cancel()
    self.failureResultOf(d, defer.CancelledError)
