def test_update_with_path_new_keys(self): modname = setup_settings_file(SOME_DICT) config = Config({'VAR1': 'ORIGINAL'}) config.update_with_path(modname, only_new_keys=True) self.assertEqual(config, {'VAR1': 'ORIGINAL', 'VAR2': 'val2'})
def test_update_with_path(self): modname = setup_settings_file(SOME_DICT) config = Config() config.update_with_path(modname) self.assertEqual(config, {'VAR1': 'val1', 'VAR2': 'val2'})
def test_update_with_path_allowed_keys(self): modname = setup_settings_file(SOME_DICT) config = Config() config.update_with_path(modname, allowed_keys=['VAR1']) self.assertEqual(config, {'VAR1': 'val1'})