#NEWLINE# def test_remove_io_runtime_error( self ) : #NEWLINE# #INDENT# '\n        Test if it removes for path expression\n        ' #NEWLINE# mock = MagicMock ( side_effect = RuntimeError ( 'error' ) ) #NEWLINE# with patch . object ( _Augeas , 'save' , mock ) : #NEWLINE# #INDENT# self . assertEqual ( augeas_cfg . remove ( '/etc/service-name' ) , { #NEWLINE# #INDENT# 'count' : 0 , #NEWLINE# 'error' : 'error' , #NEWLINE# 'retval' : False , #NEWLINE# #UNINDENT# } )