libvirt.test: Fix bugs in undefine test

Signed-off-by: Li Yang <liyang.fnst@cn.fujitsu.com>
Merge pull request #167 from liyangfnst/undefine_fix

libvirt.test: Fix bugs in undefine test