Ejemplo n.º 1
0
    def test_options(self):
        """Test options method.
        [framework]
        framework_https_cert=default
        framework_https_key=default
        framework_ip=192.168.2.22
        """
        test_section = "framework"
        test_section_options = ['framework_ip', 'framework_https_key', 'framework_https_cert']

        config = AVConfigParser(DEFAULT_SECTION)
        self.assertEqual(config.options(DEFAULT_SECTION),[])
        self.assertEqual(config.options(test_section),[])

        self.assertEqual(config.read(TEST_FILES_PATH + "ossim_setup1.conf"),AVConfigParserErrors.ALL_OK)
        self.assertTrue(config.has_section(test_section))
        self.assertEqual(config.options(test_section), test_section_options)
        del config
Ejemplo n.º 2
0
    def test_options(self):
        """Test options method.
        [framework]
        framework_https_cert=default
        framework_https_key=default
        framework_ip=192.168.2.22
        """
        test_section = "framework"
        test_section_options = [
            'framework_ip', 'framework_https_key', 'framework_https_cert'
        ]

        config = AVConfigParser(DEFAULT_SECTION)
        self.assertEqual(config.options(DEFAULT_SECTION), [])
        self.assertEqual(config.options(test_section), [])

        self.assertEqual(config.read(TEST_FILES_PATH + "ossim_setup1.conf"),
                         AVConfigParserErrors.ALL_OK)
        self.assertTrue(config.has_section(test_section))
        self.assertEqual(config.options(test_section), test_section_options)
        del config