How about use /bin/true just like VIRSH_EXEC?
Anyway, raising TestFail in API module is not a good idea.