Пример #1
0
def mocked_check21():
    check = RiakCs(common.CHECK_NAME, None, {}, [{}])

    file_contents = common.read_fixture('riakcs21_in.json')

    check._get_stats = mock.Mock(return_value=check.load_json(file_contents))
    return check
Пример #2
0
def mocked_check():
    check = RiakCs(common.CHECK_NAME, None, {}, [{}])
    check._connect = mock.Mock(
        return_value=(None, None, ["aggregation_key:localhost:8080"], []))

    file_contents = common.read_fixture('riakcs_in.json')

    check._get_stats = mock.Mock(return_value=check.load_json(file_contents))
    return check