virt-manager/003-5bad22e8-tests-Use-get-set_prop.patch

31 lines
1.1 KiB
Diff
Raw Normal View History

References: jsc#SLE-6262, fate#327048: KVM: Boot Configuration Override (virt-manager)
Subject: tests: Use (get|set)_prop
From: Marc Hartmayer mhartmay@linux.ibm.com Tue Feb 26 10:56:33 2019 +0100
Date: Wed Mar 6 13:13:13 2019 -0500:
Git: 5bad22e8375f60bb838f7f5e0bbf58d78ffd91ee
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index 709bc48f..df6f022e 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -68,12 +68,12 @@ class XMLParseTest(unittest.TestCase):
Check expected initial value obj.param == initval, then
set newval, and make sure it is returned properly
"""
- curval = getattr(obj, param)
+ curval = virtinst.xmlapi.get_prop(obj, param)
self.assertEqual(initval, curval)
for newval in args:
- setattr(obj, param, newval)
- curval = getattr(obj, param)
+ virtinst.xmlapi.set_prop(obj, param, newval)
+ curval = virtinst.xmlapi.get_prop(obj, param)
self.assertEqual(newval, curval)
def _make_checker(self, obj):