コード例 #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
ファイル: test_context_pass.py プロジェクト: herlo/linch-pin
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
ファイル: test_context_pass.py プロジェクト: herlo/linch-pin
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'])