'Assert that the transport for the given protocol has been disconnected.
L{SSHCommandClientEndpoint.newConnection} creates a new dedicated SSH
connection and cleans it up after the command exits.'

def assertClientTransportState(self, client, immediateClose):

    if immediateClose:
        self.assertTrue(client.transport.aborted)
    else:
        self.assertTrue(client.transport.disconnecting)
