Add mock libvirt objects

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-07-13 23:28:02 +02:00
parent d380fb4aba
commit 71161bfb93
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE
2 changed files with 12 additions and 0 deletions

View File

@ -41,6 +41,12 @@ class TestVM(qubes.vm.BaseVM):
netid = qid
uuid = uuid.uuid5(uuid.NAMESPACE_DNS, 'testvm')
class MockLibvirt(object):
def undefine(self):
pass
libvirt_domain = MockLibvirt()
def is_halted(self):
return True

View File

@ -292,6 +292,12 @@ class TestVM(qubes.vm.BaseVM):
netid = qid
uuid = uuid.uuid5(uuid.NAMESPACE_DNS, 'testvm')
class MockLibvirt(object):
def undefine(self):
pass
libvirt_domain = MockLibvirt()
def is_halted(self):
return True