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

def test_channel_session_double_method(self):

    message = Message({u'reply_channel': u'test-reply'}, None, None)
    class Consumer(object, ):
        @channel_session
        @channel_session
        def inner(self, message):
            message.channel_session[u'num_ponies'] = (-1)
    Consumer().inner(message)
    session2 = session_for_reply_channel(u'test-reply')
    self.assertEqual(session2[u'num_ponies'], (-1))
