#NEWLINE# @ mock . patch . object ( time , 'sleep' ) #NEWLINE# @ mock . patch . object ( ribcl . RIBCLOperations , 'get_product_name' ) #NEWLINE# def test_wait_for_ilo_after_reset_fail( self , name_mock , time_mock ) : #NEWLINE# #INDENT# exc = exception . IloError ( 'error' ) #NEWLINE# name_mock . side_effect = time_mock #NEWLINE# self . assertRaises ( exception . IloError , common . wait_for_ilo_after_reset , self . ribcl ) #NEWLINE# self . assertEqual ( 10 , name_mock . call_count ) #NEWLINE# name_mock . assert_called_with ( )