tests: xmlparse: use set_special_mode function

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@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Pavel Hrdina 2019-03-14 12:03:53 +01:00
parent 9fdbbca27f
commit 8f870c3fca

View File

@ -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")