#NEWLINE# @ mock . patch ( 'time.sleep' , return_value = None ) #NEWLINE# def test_success( self , mock_sleep ) : #NEWLINE# #INDENT# resource = mock . Mock ( ) #NEWLINE# resource . get . side_effect = [ None , None , exceptions . NotFoundException ] #NEWLINE# result = resource2 . wait_for_delete ( 'session' , resource , 1 , 3 ) #NEWLINE# self . assertEqual ( self , resource )