def stubout_attach_disks(stubs):
 def f(*args):
  raise fake.Failure('Test Exception raised by fake _attach_disks')
 stubs.Set(vmops.VMOps, '_attach_disks', f)

def stubout_attach_disks ( stubs ) : def f ( * args ) : raise fake . Failure ( 'Test Exception raised by fake _attach_disks' ) stubs . Set ( vmops . VMOps , '_attach_disks' , f )
simulates a failure in _attach_disks .