def mock(init_config, instance): check = MesosMaster(common.CHECK_NAME, init_config, [instance]) check._get_master_roles = lambda v, x: json.loads( read_fixture('roles.json')) check._get_master_stats = lambda v, x: json.loads( read_fixture('stats.json')) check._get_master_state = lambda v, x: json.loads( read_fixture('state.json')) return check
def check(): check = MesosMaster(CHECK_NAME, {}, {}) check._get_master_roles = lambda v, x, y, z: json.loads( read_fixture('roles.json')) check._get_master_stats = lambda v, x, y, z: json.loads( read_fixture('stats.json')) check._get_master_state = lambda v, x, y, z: json.loads( read_fixture('state.json')) return check