示例#1
0
    def test__set_info(self):
        @patch("Bcfg2.Server.Plugins.Cfg.CfgInfo._set_info")
        def inner(mock_set_info):
            ci = self.get_obj()
            entry = Mock()
            info = {"foo": "foo", "__children__": ["one", "two"]}
            ci._set_info(entry, info)
            self.assertItemsEqual(entry.append.call_args_list, [call(c) for c in info["__children__"]])

        inner()
        TestCfgInfo.test__set_info(self)
示例#2
0
    def test__set_info(self):
        @patch("Bcfg2.Server.Plugins.Cfg.CfgInfo._set_info")
        def inner(mock_set_info):
            ci = self.get_obj()
            entry = Mock()
            info = {"foo": "foo", "__children__": ["one", "two"]}
            ci._set_info(entry, info)
            self.assertItemsEqual(entry.append.call_args_list,
                                  [call(c) for c in info['__children__']])

        inner()
        TestCfgInfo.test__set_info(self)
示例#3
0
 def test__init(self):
     TestCfgInfo.test__init(self)
     ci = self.get_obj()
     self.assertIsInstance(ci.infoxml, InfoXML)
示例#4
0
 def test__init(self):
     TestCfgInfo.test__init(self)
     ci = self.get_obj()
     self.assertIsInstance(ci.infoxml, InfoXML)
示例#5
0
 def setUp(self):
     TestCfgInfo.setUp(self)
     set_setup_default("filemonitor", MagicMock())