'Tests the channel_session decorator detects being wrapped in itself
and doesn\'t blow up.'

def test_channel_session_double_third_arg(self):

    message = Message({u'reply_channel': u'test-reply'}, None, None)
    @channel_session
    @channel_session
    def inner(a, b, message):
        message.channel_session[u'num_ponies'] = (-1)
    with self.assertRaisesMessage(ValueError, u'channel_session    called    without    Message    instance'):
        inner(None, None, message)
