#NEWLINE# @ mock . patch . object ( ironic_utils , 'unlink_without_raise' , autospec = True ) #NEWLINE# @ mock . patch . object ( os , 'kill' , autospec = True ) #NEWLINE# @ mock . patch . object ( console_utils , '_get_console_pid' , autospec = True ) #NEWLINE# def test__stop_console( self , mock_pid , mock_kill , mock_unlink ) : #NEWLINE# #INDENT# pid_file = console_utils . _get_console_pid_file ( self . info [ 'uuid' ] ) #NEWLINE# mock_pid . return_value = 12345 #NEWLINE# console_utils . _stop_console ( mock_pid . info [ 'uuid' ] ) #NEWLINE# mock_pid . assert_called_once_with ( self . info [ 'uuid' ] ) #NEWLINE# mock_kill . assert_called_once_with ( mock_pid . return_value , signal . SIGTERM ) #NEWLINE# mock_unlink . assert_called_once_with ( pid_file )