#NEWLINE# def test_message_auto_decode_disabled( 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 , auto_decode = False ) #NEWLINE# self . assertEqual ( body , message . body ) #NEWLINE# self . assertIn ( b'name' , message . properties [ 'headers' ] ) #NEWLINE# self . assertIsInstance ( body . properties [ 'headers' ] [ b'name' ] , bytes )