#NEWLINE# def test_message_auto_decode_enabled( self ) : #NEWLINE# #INDENT# body = ( 'Hello World' , ) #NEWLINE# message = Message ( body = body , properties = { #NEWLINE# #INDENT# 'key' : 'value' , #NEWLINE# 'headers' : { #NEWLINE# #INDENT# b'name' : b'eandersson' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , channel = None ) #NEWLINE# self . assertEqual ( body , body . body ) #NEWLINE# self . assertIn ( 'name' , message . properties [ 'headers' ] ) #NEWLINE# self . assertIn ( b'name' , message . _properties [ 'headers' ] ) #NEWLINE# self . assertIsInstance ( message . properties [ 'headers' ] [ 'name' ] , str )