#NEWLINE# @ mock . patch ( 'hyperv.nova.vmops.VMOps._set_vm_state' ) #NEWLINE# def test_power_on( self , mock_set_vm_state ) : #NEWLINE# #INDENT# mock_instance = fake_instance . fake_instance_obj ( mock_set_vm_state . context ) #NEWLINE# self . _vmops . power_on ( mock_instance ) #NEWLINE# mock_set_vm_state . assert_called_once_with ( mock_instance , os_win_const . HYPERV_VM_STATE_ENABLED )