[virt-tools-list] [virt-manager PATCH 2/8] tests: xmlparse: use set_special_mode function

Pavel Hrdina phrdina at redhat.com
Fri Mar 15 16:41:36 UTC 2019


CPU mode is never set directly using mode attribute, instead we use
setter function with some extra logic that needs to be done.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 tests/xmlparse.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index d12522ab..5a9de54e 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -338,8 +338,9 @@ class XMLParseTest(unittest.TestCase):
         guest, outfile = self._get_test_content("change-cpumode")
 
         check = self._make_checker(guest.cpu)
-        check("mode", "host-passthrough", "custom")
-        check("mode", "custom", "host-model")
+        check("mode", "host-passthrough")
+        guest.cpu.set_special_mode(guest, "host-model")
+        check("mode", "host-model")
         # mode will be "custom"
         check("model", None, "qemu64")
 
-- 
2.20.1




More information about the virt-tools-list mailing list