'Test that channel extended data messages are sent in the right format.'

def test_sendExtendedData(self):

    channel = TestChannel()
    self._openChannel(channel)
    self.conn.sendExtendedData(channel, 1, 'test')
    channel.localClosed = True
    self.conn.sendExtendedData(channel, 2, 'test2')
    self.assertEqual(self.transport.packets, [(connection.MSG_CHANNEL_EXTENDED_DATA, (('\x00\x00\x00\xff' + '\x00\x00\x00\x01') + common.NS('test')))])
