#NEWLINE# @ mock . patch . object ( time , 'sleep' ) #NEWLINE# @ mock . patch . object ( ris . RISOperations , 'get_firmware_update_progress' ) #NEWLINE# def test_wait_for_ris_firmware_update_to_complete_fail( self , get_firmware_update_progress_mock , sleep_mock ) : #NEWLINE# #INDENT# exc = exception . IloError ( 'error' ) #NEWLINE# get_firmware_update_progress_mock . side_effect = exc #NEWLINE# self . assertRaises ( exception . IloError , common . wait_for_ris_firmware_update_to_complete , self . ris ) #NEWLINE# self . assertEqual ( 10 , get_firmware_update_progress_mock . call_count )