Example #1
0
    def test_Index(self):
        TestStructFile.test_Index(self)

        pf = self.get_obj()
        pf.xdata = lxml.etree.Element("Properties")
        lxml.etree.SubElement(pf.xdata, "Crypted", encrypted="foo")
        pf.data = lxml.etree.tostring(pf.xdata)
Example #2
0
    def test_Index(self):
        TestStructFile.test_Index(self)

        pf = self.get_obj()
        pf.xdata = lxml.etree.Element("Properties", encryption="true")
        pf.data = lxml.etree.tostring(pf.xdata)
        # extra test: crypto is not available, but properties file is
        # encrypted
        has_crypto = Bcfg2.Server.Plugins.Properties.HAS_CRYPTO
        Bcfg2.Server.Plugins.Properties.HAS_CRYPTO = False
        self.assertRaises(PluginExecutionError, pf.Index)
        Bcfg2.Server.Plugins.Properties.HAS_CRYPTO = has_crypto
Example #3
0
 def get_obj(self, *args, **kwargs):
     return TestStructFile.get_obj(self, *args, **kwargs)
Example #4
0
 def setUp(self):
     TestPropertyFile.setUp(self)
     TestStructFile.setUp(self)
     set_setup_default("automatch", False)
Example #5
0
 def setUp(self):
     TestCfgCreator.setUp(self)
     TestStructFile.setUp(self)