#NEWLINE# def test_retry_on_exception_immediate_success( self ) : #NEWLINE# #INDENT# working_func = mock . Mock ( ) #NEWLINE# working_func . return_value = 'works' #NEWLINE# self . assertEquals ( retry_on_exception ( working_func , 3 , ( IOError , ) ) , 'works' ) #NEWLINE# self . assertEquals ( self . call_count , 1 )