Browse Source

tests: fix AdminVM test

Marek Marczykowski-Górecki 6 years ago
parent
commit
34ff40c721
1 changed files with 5 additions and 2 deletions
  1. 5 2
      qubes/tests/vm/adminvm.py

+ 5 - 2
qubes/tests/vm/adminvm.py

@@ -34,8 +34,11 @@ class TC_00_AdminVM(qubes.tests.QubesTestCase):
         super().setUp()
         try:
             self.app = qubes.tests.vm.TestApp()
-            self.vm = qubes.vm.adminvm.AdminVM(self.app,
-                xml=None)
+            with unittest.mock.patch.object(
+                    qubes.vm.adminvm.AdminVM, 'start_qdb_watch') as mock_qdb:
+                self.vm = qubes.vm.adminvm.AdminVM(self.app,
+                    xml=None)
+                mock_qdb.assert_called_once_with('dom0')
         except:  # pylint: disable=bare-except
             if self.id().endswith('.test_000_init'):
                 raise