#NEWLINE# @ record #NEWLINE# def test_message_base64_decode_fails( self ) : #NEWLINE# #INDENT# qs2 = self . _create_storage_service ( QueueService , qs2 . settings ) #NEWLINE# qs2 . encode_function = QueueMessageFormat . text_xmlencode #NEWLINE# qs2 . decode_function = QueueMessageFormat . binary_base64decode #NEWLINE# queue_name = self . _create_queue ( ) #NEWLINE# message = 'xyz' #NEWLINE# qs2 . put_message ( queue_name , message ) #NEWLINE# try : #NEWLINE# #INDENT# qs2 . get_messages ( queue_name ) #NEWLINE# self . fail ( 'Decoding unicode string as base64 should fail.' ) #NEWLINE# #UNINDENT# except ValueError as e : #NEWLINE# #INDENT# self . assertEqual ( str ( e ) , 'message is not a valid base64 value.' )