#NEWLINE# @ mock . patch . object ( volume_utils , 'forget_sr' ) #NEWLINE# @ mock . patch . object ( volume_utils , 'find_sr_by_uuid' , side_effect = test . TestingException ) #NEWLINE# def test_rollback_dest_handles_exception( self , find_sr_ref , forget_sr ) : #NEWLINE# #INDENT# block_device_info = { #NEWLINE# #INDENT# 'block_device_mapping' : [ { #NEWLINE# #INDENT# 'connection_info' : { #NEWLINE# #INDENT# 'data' : { #NEWLINE# #INDENT# 'volume_id' : 'fake-uuid' , #NEWLINE# 'target_iqn' : 'fake-iqn' , #NEWLINE# 'target_portal' : 'fake-portal' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . vmops . rollback_live_migration_at_destination ( 'instance' , block_device_info ) #NEWLINE# self . assertFalse ( forget_sr . called )