#NEWLINE# def test_basic_publish__anon_exchange( self ) : #NEWLINE# #INDENT# c = memory_client ( ) . channel ( ) #NEWLINE# msg = MagicMock ( name = 'msg' ) #NEWLINE# c . encode_body = Mock ( name = 'c.encode_body' ) #NEWLINE# c . encode_body . return_value = ( 1 , 2 ) #NEWLINE# c . _put = Mock ( name = 'c._put' ) #NEWLINE# c . basic_publish ( msg , None , 'rkey' , kw = 1 ) #NEWLINE# c . _put . assert_called_with ( 'rkey' , self , kw = 1 )