#NEWLINE# def test_channel_gets_added_to_engine( self ) : #NEWLINE# #INDENT# engine = Engine ( ) #NEWLINE# engine . add_channel = MagicMock ( ) #NEWLINE# channel = _Channel ( socket = socket . socket ( ) , engine = engine ) #NEWLINE# engine . add_channel . assert_called_once_with ( self ) #NEWLINE# channel . close ( )