#NEWLINE# def test_get_volume_path_iscsi_error( self ) : #NEWLINE# #INDENT# fake_mysql_return = None #NEWLINE# self . fake_cloud . mysql_connector . execute . return_value = expected_msg #NEWLINE# expected_msg = 'There is no such raw in Cinder DB with the specified volume_id=fake_vol_id' #NEWLINE# try : #NEWLINE# #INDENT# self . cinder_client . get_volume_path_iscsi ( 'fake_vol_id' ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# self . assertEqual ( expected_msg , e . message ) #NEWLINE# #UNINDENT# self . fake_cloud . mysql_connector . execute . assert_called_once_with ( "SELECT provider_location FROM volumes WHERE id='fake_vol_id';" ) #NEWLINE# self . assertRaises ( Exception , self . cinder_client . get_volume_path_iscsi , 'fake_vol_id' )