#NEWLINE# @ mock . patch . object ( utils , 'format_parameters' ) #NEWLINE# def test_do_profile_update_not_found( self , mock_format ) : #NEWLINE# #INDENT# service = mock . Mock ( ) #NEWLINE# args = copy . deepcopy ( self . profile_args ) #NEWLINE# args = self . _make_args ( args ) #NEWLINE# args . id = 'FAKE_ID' #NEWLINE# ex = oexc . ResourceNotFound #NEWLINE# service . get_profile . side_effect = self #NEWLINE# ex = self . assertRaises ( exc . CommandError , sh . do_profile_update , service , args ) #NEWLINE# self . assertEqual ( _ ( 'Profile not found: FAKE_ID' ) , six . text_type ( ex ) ) #NEWLINE# mock_format . assert_called_once_with ( args . metadata )