diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-13 13:47:30 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-08-14 09:16:47 -0400 |
commit | ac5eb3da9b19e1a35b81689e4d0ddac20f16f301 (patch) | |
tree | a047d3ebf28c779993c9a143138b08c93fb05e16 /testsuite/Testsrc/Testlib/TestServer/TestPlugin | |
parent | da0918e71e82c407e1dc7f5cb80f33cad93263af (diff) | |
download | bcfg2-ac5eb3da9b19e1a35b81689e4d0ddac20f16f301.tar.gz bcfg2-ac5eb3da9b19e1a35b81689e4d0ddac20f16f301.tar.bz2 bcfg2-ac5eb3da9b19e1a35b81689e4d0ddac20f16f301.zip |
PrioDir: Fixed event handler
Diffstat (limited to 'testsuite/Testsrc/Testlib/TestServer/TestPlugin')
-rw-r--r-- | testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py index b2f2e4e11..c339b9e1d 100644 --- a/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py +++ b/testsuite/Testsrc/Testlib/TestServer/TestPlugin/Testhelpers.py @@ -1199,13 +1199,20 @@ class TestPrioDir(TestPlugin, TestGenerator, TestXMLDirectoryBacked): Mock()) def inner(): pd = self.get_obj() - test1 = Mock() - test1.items = dict(Path=["/etc/foo.conf", "/etc/bar.conf"]) - test2 = Mock() - test2.items = dict(Path=["/etc/baz.conf"], - Package=["quux", "xyzzy"]) - pd.entries = {"/test1.xml": test1, - "/test2.xml": test2} + test1 = lxml.etree.Element("Test") + lxml.etree.SubElement(test1, "Path", name="/etc/foo.conf") + lxml.etree.SubElement(lxml.etree.SubElement(test1, + "Group", name="foo"), + "Path", name="/etc/bar.conf") + + test2 = lxml.etree.Element("Test") + lxml.etree.SubElement(test2, "Path", name="/etc/baz.conf") + lxml.etree.SubElement(test2, "Package", name="quux") + lxml.etree.SubElement(lxml.etree.SubElement(test2, + "Group", name="bar"), + "Package", name="xyzzy") + pd.entries = {"/test1.xml": Mock(xdata=test1), + "/test2.xml": Mock(xdata=test2)} pd.HandleEvent(Mock()) self.assertItemsEqual(pd.Entries, dict(Path={"/etc/foo.conf": pd.BindEntry, |