Esempio n. 1
0
    def test_006_config_manager(self):
        """ Test adding to the config context, adding single values that do
        overwrite existing.
        """
        cfg = ConfigManager(self.default_file)

        self.assertNotIn('value10', cfg.__dict__)
        cfg.value10 = 5000
        self.assertIn('value10', cfg.__dict__)
        self.assertEqual(cfg.value10, 5000)
        cfg.value10 = 'new-value'
        self.assertIn('value10', cfg.__dict__)
        self.assertEqual(cfg.value10, 'new-value')
Esempio n. 2
0
    def test_005_config_manager(self):
        """ Test adding to the config context, adding single values that do not
        overwrite existing.
        """
        cfg = ConfigManager(self.default_file)

        self.assertNotIn('value10', cfg.__dict__)
        cfg.value10 = 5000
        self.assertIn('value10', cfg.__dict__)