#NEWLINE# @ patch ( 'pyon.net.channel.log' , Mock ( ) ) #NEWLINE# def test_close( self ) : #NEWLINE# #INDENT# transport = Mock ( ) #NEWLINE# ch = BaseChannel ( ) #NEWLINE# ch . on_channel_open ( transport ) #NEWLINE# ch . _fsm . current_state = ch . S_ACTIVE #NEWLINE# ch . close ( ) #NEWLINE# transport . close . assert_called_once_with ( )