Exemplo n.º 1
0
def mock(init_config, instance):
    check = MesosSlave(common.CHECK_NAME, init_config, [instance])

    check._get_stats = lambda v, x: json.loads(read_fixture('stats.json'))
    check._get_state = lambda v, x: json.loads(read_fixture('state.json'))

    return check
Exemplo n.º 2
0
def check():
    check = MesosSlave(CHECK_NAME, {}, {})
    check._get_stats = lambda v, x, y, z: json.loads(read_fixture('stats.json')
                                                     )
    check._get_state = lambda v, x, y, z: json.loads(read_fixture('state.json')
                                                     )

    return check