From 71161bfb934da8594f66d3303945ad63ffef5be9 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Wed, 13 Jul 2016 23:28:02 +0200 Subject: [PATCH] Add mock libvirt objects --- qubes/tests/app.py | 6 ++++++ qubes/tests/init.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/qubes/tests/app.py b/qubes/tests/app.py index e0190358..adbe8447 100644 --- a/qubes/tests/app.py +++ b/qubes/tests/app.py @@ -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 diff --git a/qubes/tests/init.py b/qubes/tests/init.py index 351c8081..99105e47 100644 --- a/qubes/tests/init.py +++ b/qubes/tests/init.py @@ -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