def test_set_cfg(): lpc = LinchpinCliContext() lpc.load_config(config_path) lpc.set_cfg('test', 'key', 'value') assert_equal(lpc.get_cfg('test', 'key'), lpc.cfgs['test']['key'])
def test_get_cfg(): lpc = LinchpinCliContext() lpc.load_config() cfg_value = lpc.get_cfg(section='lp', key='pkg') assert_equal(cfg_value, config_data['lp']['pkg'])
def test_get_cfg(): lpc = LinchpinCliContext() lpc.load_config(config_path) cfg_value = lpc.get_cfg('hookstates', 'up') assert_equal(cfg_value, config_data['hookstates']['up'])