Exemple #1
0
    def test_prod_configs(self):
        globals_ = {}
        main_configs = get_configs_path(['test_configs_not_exists', 'prod.cfg'])
        overrides = get_configs_path(['test_configs_overrides_not_exists'])

        configs = parse_configs(main_configs, overrides, logger, globals_, globals_)

        self.assertEqual(configs, get_configs_path(['prod.cfg']))
        self.assertTrue(globals_['feature'])
Exemple #2
0
    def test_only_dev_configs(self):
        globals_ = {}
        main_configs = get_configs_path(['dev.cfg.example'])
        overrides = get_configs_path(['dev.cfg'])

        configs = parse_configs(main_configs, overrides, logger, globals_, globals_)

        self.assertEqual(configs, get_configs_path(['dev.cfg.example', 'dev.cfg']))
        self.assertFalse(globals_['feature2'])