tests: fix AdminVM test

This commit is contained in:
Marek Marczykowski-Górecki 2017-07-29 05:07:45 +02:00
parent c8c32d4956
commit 34ff40c721
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

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