'Closing an SSH connection should close all sessions within it.'

def test_stopConnectionServiceClosesChannel(self):

    conn = self.buildServerConnection()
    packet = (common.NS('session') + (struct.pack('>L', 0) * 3))
    conn.ssh_CHANNEL_OPEN(packet)
    sessionChannel = conn.channels[0]
    sessionChannel.request_subsystem(common.NS('sftp'))
    sftpServer = sessionChannel.client.transport.proto
    self.interceptConnectionLost(sftpServer)
    conn.serviceStopped()
    self.assertSFTPConnectionLost()
