'Test if decode_body() works when encoding is set correctly.'

@patch((QPID_MODULE + u'.Channel.codecs'))
def test_decode_body_expected_encoding(self, mock_codecs):

    mock_body = Mock()
    mock_decoder = Mock()
    mock_decoded_result = Mock()
    mock_codecs.get.return_value = mock_decoder
    mock_decoder.decode.return_value = mock_decoded_result
    result = self.my_channel.decode_body(mock_body, encoding=u'base64')
    assert (mock_decoded_result == result)
