Exemplo n.º 1
0
    def testConfigurationCorrectness(self):
        config = RequiredFeature('config-helper').request()
        config._configure(**self.fake_settings)
        config._dump_conf()

        self.assertEqual(self.bin_path, config.get_section_setting('General', 'binpath'))
        self.assertEqual('192.168.1.1', config.get_section_setting('General', 'address'))
        self.assertEqual('60', config.get_section_setting('General', 'fps'))
        self.assertEqual('-1', config.get_section_setting('General', 'bitrate'))
        self.assertEqual('1024', config.get_section_setting('General', 'packetsize'))
        self.assertEqual(os.path.join(self.addon_path, 'input.map'), config.get_section_setting('General', 'mapping'))
        self.assertEqual(os.path.join(self.addon_path, 'input.device'), config.get_section_setting('General', 'input'))
        self.assertEqual('False', config.get_section_setting('General', 'sops'))
        self.assertEqual('False', config.get_section_setting('General', 'localaudio'))
        self.assertEqual('False', config.get_section_setting('General', 'remote'))
Exemplo n.º 2
0
    def testConfigurationCorrectness(self):
        config = RequiredFeature('config-helper').request()
        config._configure(**self.fake_settings)
        config._dump_conf()

        self.assertEqual(self.bin_path,
                         config.get_section_setting('General', 'binpath'))
        self.assertEqual('192.168.1.1',
                         config.get_section_setting('General', 'address'))
        self.assertEqual('60', config.get_section_setting('General', 'fps'))
        self.assertEqual('-1',
                         config.get_section_setting('General', 'bitrate'))
        self.assertEqual('1024',
                         config.get_section_setting('General', 'packetsize'))
        self.assertEqual(os.path.join(self.addon_path, 'input.map'),
                         config.get_section_setting('General', 'mapping'))
        self.assertEqual(os.path.join(self.addon_path, 'input.device'),
                         config.get_section_setting('General', 'input'))
        self.assertEqual('False',
                         config.get_section_setting('General', 'sops'))
        self.assertEqual('False',
                         config.get_section_setting('General', 'localaudio'))
        self.assertEqual('False',
                         config.get_section_setting('General', 'remote'))
Exemplo n.º 3
0
    def testConfigurationDump(self):
        config = RequiredFeature('config-helper').request()
        config._configure(**self.fake_settings)
        config._dump_conf()

        self.assertEqual(os.path.isfile(config.full_path), True)
Exemplo n.º 4
0
    def testConfigurationDump(self):
        config = RequiredFeature('config-helper').request()
        config._configure(**self.fake_settings)
        config._dump_conf()

        self.assertEqual(os.path.isfile(config.full_path), True)