#NEWLINE# @ mock . patch . object ( vmops . VMOps , '_attach_drive' ) #NEWLINE# def test_attach_config_drive( self , mock_attach_drive ) : #NEWLINE# #INDENT# instance = fake_instance . fake_instance_obj ( self . context ) #NEWLINE# self . _vmops . attach_config_drive ( instance , self . _FAKE_CONFIGDRIVE_PATH , constants . VM_GEN_1 ) #NEWLINE# mock_attach_drive . assert_called_once_with ( instance . name , self . _FAKE_CONFIGDRIVE_PATH , 1 , 0 , constants . CTRL_TYPE_IDE , constants . DISK )