libvirt: update tests to use Mock instead of MagicMock
libvirt: update tests to use Mock instead of MagicMock

Updates tests to use Mock with a spec to improve test units

Change-Id: I0b0be14911517846d16bfdba7488f265a2256931

LoHChina/nova,BeyondTheClouds/nova,Francis-Liu/animated-broccoli,Stavitsky/nova,hanlind/nova,JioCloud/nova_test_latest,gooddata/openstack-nova,Stavitsky/nova,cyx1231st/nova,mandeepdhami/nova,mikalstill/nova,klmitch/nova,sebrandon1/nova,tealover/nova,hanlind/nova,zaina/nova,rajalokan/nova,ruslanloman/nova,hanlind/nova,double12gzh/nova,belmiromoreira/nova,phenoxim/nova,fnordahl/nova,ruslanloman/nova,isyippee/nova,zzicewind/nova,jianghuaw/nova,zhimin711/nova,shail2810/nova,iuliat/nova,eonpatapon/nova,cloudbase/nova,JianyuWang/nova,tudorvio/nova,CEG-FYP-OpenStack/scheduler,openstack/nova,Tehsmash/nova,bigswitch/nova,rahulunair/nova,jianghuaw/nova,LoHChina/nova,apporc/nova,raildo/nova,Juniper/nova,klmitch/nova,alvarolopez/nova,vmturbo/nova,raildo/nova,noironetworks/nova,edulramirez/nova,barnsnake351/nova,gooddata/openstack-nova,bigswitch/nova,Juniper/nova,sebrandon1/nova,TwinkleChawla/nova,MountainWei/nova,cloudbase/nova,double12gzh/nova,klmitch/nova,whitepages/nova,takeshineshiro/nova,JianyuWang/nova,vmturbo/nova,sebrandon1/nova,fnordahl/nova,CloudServer/nova,watonyweng/nova,zhimin711/nova,dims/nova,mikalstill/nova,cloudbase/nova,devendermishrajio/nova,zaina/nova,devendermishrajio/nova,rahulunair/nova,whitepages/nova,cernops/nova,noironetworks/nova,cyx1231st/nova,cernops/nova,scripnichenko/nova,yosshy/nova,yosshy/nova,rahulunair/nova,mmnelemane/nova,varunarya10/nova_test_latest,varunarya10/nova_test_latest,yatinkumbhare/openstack-nova,j-carpentier/nova,tangfeixiong/nova,TwinkleChawla/nova,BeyondTheClouds/nova,felixma/nova,MountainWei/nova,mahak/nova,ted-gould/nova,vmturbo/nova,ted-gould/nova,barnsnake351/nova,Juniper/nova,alvarolopez/nova,Tehsmash/nova,Juniper/nova,gooddata/openstack-nova,nikesh-mahalka/nova,mikalstill/nova,gooddata/openstack-nova,devendermishrajio/nova_test_latest,jianghuaw/nova,yatinkumbhare/openstack-nova,klmitch/nova,alaski/nova,Francis-Liu/animated-broccoli,rajalokan/nova,shail2810/nova,eonpatapon/nova,tangfeixiong/nova,akash1808/nova_test_latest,mahak/nova,felixma/nova,tealover/nova,watonyweng/nova,apporc/nova,j-carpentier/nova,vmturbo/nova,NeCTAR-RC/nova,CloudServer/nova,NeCTAR-RC/nova,tudorvio/nova,rajalokan/nova,kimjaejoong/nova,dims/nova,akash1808/nova_test_latest,cernops/nova,CCI-MOC/nova,jeffrey4l/nova,edulramirez/nova,phenoxim/nova,alaski/nova,takeshineshiro/nova,mmnelemane/nova,isyippee/nova,kimjaejoong/nova,nikesh-mahalka/nova,mandeepdhami/nova,CEG-FYP-OpenStack/scheduler,BeyondTheClouds/nova,CCI-MOC/nova,rajalokan/nova,mahak/nova,openstack/nova,devendermishrajio/nova_test_latest,openstack/nova,belmiromoreira/nova,iuliat/nova,jianghuaw/nova,scripnichenko/nova,zzicewind/nova,jeffrey4l/nova,JioCloud/nova_test_latest