From 34ff40c721c658f2203fa4e1a09e649d32f9b304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 29 Jul 2017 05:07:45 +0200 Subject: [PATCH] tests: fix AdminVM test --- qubes/tests/vm/adminvm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qubes/tests/vm/adminvm.py b/qubes/tests/vm/adminvm.py index b5c9115a..50d7494c 100644 --- a/qubes/tests/vm/adminvm.py +++ b/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