Browse Source

Test that a DispVM’s template can be changed

Previously this raised a QubesValueError.
Demi Marie Obenour 3 years ago
parent
commit
f4d93fd68e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      qubes/tests/vm/dispvm.py

+ 4 - 2
qubes/tests/vm/dispvm.py

@@ -116,10 +116,12 @@ class TC_00_DispVM(qubes.tests.QubesTestCase):
             dispvm = self.app.add_new_vm(qubes.vm.dispvm.DispVM,
                 name='test-dispvm', template=self.appvm)
 
-            with self.assertRaises(qubes.exc.QubesValueError):
+            with self.assertRaises(qubes.exc.QubesVMNotHaltedError):
                 dispvm.template = self.appvm
-            with self.assertRaises(qubes.exc.QubesValueError):
+            with self.assertRaises(qubes.exc.QubesVMNotHaltedError):
                 dispvm.template = qubes.property.DEFAULT
+            dispvm.kill()
+            dispvm.template = qubes.property.DEFAULT
 
     def test_003_dvmtemplate_template_change(self):
         self.appvm.template_for_dispvms = True