#NEWLINE# @ mock . patch . object ( vm_utils , 'try_auto_configure_disk' ) #NEWLINE# @ mock . patch . object ( vm_utils , 'create_vbd' , side_effect = test . TestingException ) #NEWLINE# def test_attach_disks_rescue_auto_disk_config_false( self , create_vbd , try_auto_config ) : #NEWLINE# #INDENT# ctxt = context . RequestContext ( 'user' , 'project' ) #NEWLINE# instance = fake_instance . fake_instance_obj ( ctxt ) #NEWLINE# image_meta = objects . ImageMeta . from_dict ( { #NEWLINE# #INDENT# 'properties' : { #NEWLINE# #INDENT# 'auto_disk_config' : 'false' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# vdis = { #NEWLINE# #INDENT# 'root' : { #NEWLINE# #INDENT# 'ref' : 'fake-ref' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertRaises ( test . TestingException , self . _vmops . _attach_disks , instance , image_meta = instance , vm_ref = None , name_label = None , vdis = vdis , disk_image_type = 'fake' , network_info = [ ] , rescue = True ) #NEWLINE# self . assertFalse ( try_auto_config . called )