예제 #1
0
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'])
예제 #2
0
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'])
예제 #3
0
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'])
예제 #4
0
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'])
예제 #5
0
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'])