#NEWLINE# @ catch_notimplementederror #NEWLINE# @ mock . patch ( 'nova.utils.get_image_from_system_metadata' ) #NEWLINE# @ mock . patch ( 'nova.virt.libvirt.host.Host.has_min_version' ) #NEWLINE# def test_set_admin_password( self , ver , mock_image ) : #NEWLINE# #INDENT# self . flags ( virt_type = 'kvm' , group = 'libvirt' ) #NEWLINE# mock_image . return_value = { #NEWLINE# #INDENT# 'properties' : { #NEWLINE# #INDENT# 'hw_qemu_guest_agent' : 'yes' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# ( instance , network_info ) = self . _get_running_instance ( obj = True ) #NEWLINE# self . connection . set_admin_password ( instance , 'p4ssw0rd' )