def stubout_is_snapshot(stubs):
 def f(*args):
  return True
 stubs.Set(vm_utils, 'is_snapshot', f)

def stubout_is_snapshot ( stubs ) : def f ( * args ) : return True stubs . Set ( vm_utils , 'is_snapshot' , f )
always returns true xenapi fake driver does not create vmrefs for snapshots .