37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
|
References: jsc#SLE-6262, fate#327048: KVM: Boot Configuration Override (virt-manager)
|
||
|
|
||
|
Subject: tests: xmlparse: refactor method for generating out file path
|
||
|
From: Marc Hartmayer mhartmay@linux.ibm.com Tue Feb 26 10:56:36 2019 +0100
|
||
|
Date: Wed Mar 6 13:15:38 2019 -0500:
|
||
|
Git: ecc0861c891263eacba8f63e9aa74797a1e7cba2
|
||
|
|
||
|
Refactor method for generating out file path. It will be used in a
|
||
|
upcoming patch.
|
||
|
|
||
|
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 df6f022e..2dbaf24c 100644
|
||
|
--- a/tests/xmlparse.py
|
||
|
+++ b/tests/xmlparse.py
|
||
|
@@ -81,9 +81,17 @@ class XMLParseTest(unittest.TestCase):
|
||
|
return self._set_and_check(obj, name, initval, *args)
|
||
|
return check
|
||
|
|
||
|
+ def _gen_outfile_path(self, basename):
|
||
|
+ """
|
||
|
+ Returns relative path to the file containing the expected XML
|
||
|
+ output
|
||
|
+
|
||
|
+ """
|
||
|
+ return "tests/xmlparse-xml/{!s}-out.xml".format(basename)
|
||
|
+
|
||
|
def _get_test_content(self, basename, kvm=False):
|
||
|
infile = "tests/xmlparse-xml/%s-in.xml" % basename
|
||
|
- outfile = "tests/xmlparse-xml/%s-out.xml" % basename
|
||
|
+ outfile = self._gen_outfile_path(basename)
|
||
|
guest = virtinst.Guest(kvm and self.kvmconn or self.conn,
|
||
|
parsexml=open(infile).read())
|
||
|
return guest, outfile
|