'Test that getChannel dispatches to the avatar when an avatar is
present. Correct functioning without the avatar is verified in
test_CHANNEL_OPEN.'

def test_getChannelWithAvatar(self):

    channel = self.conn.getChannel('TestChannel', 50, 30, 'data')
    self.assertEqual(channel.data, 'data')
    self.assertEqual(channel.remoteWindowLeft, 50)
    self.assertEqual(channel.remoteMaxPacket, 30)
    self.assertRaises(error.ConchError, self.conn.getChannel, 'BadChannel', 50, 30, 'data')
