#NEWLINE# @ patch ( 'pyon.net.channel.BaseChannel' ) #NEWLINE# @ patch ( 'pyon.net.channel.ChannelShutdownMessage' ) #NEWLINE# @ patch ( 'pyon.net.channel.log' , Mock ( ) ) #NEWLINE# def test_close_impl( self , mockshutdown , mockbasechannel ) : #NEWLINE# #INDENT# mockrq = Mock ( spec = RecvChannel . SizeNotifyQueue ) #NEWLINE# self . ch . _recv_queue = mockrq #NEWLINE# self . ch . close_impl ( ) #NEWLINE# mockshutdown . assert_called_once_with ( ) #NEWLINE# mockrq . put . assert_called_once_with ( mockshutdown ( ) ) #NEWLINE# mockbasechannel . close_impl . assert_called_once_with ( self . ch )