<commit_before>import json
import logging

import pytest
import responses

from flash_services.buddy import Buddy
from flash_services.core import Service


@pytest.fixture
def service():
    return Buddy(api_token='foo', domain='bar', project_name='baz', pipeline_id=123)


@pytest.fixture
def buddy_json():
    """Example from https://buddy.works/docs/api/pipelines/executions/list."""
    with open('buddy.json') as json_file:
        return json.load(json_file)


def test_buddy_service_type():
    assert issubclass(Buddy, Service)


def test_correct_config():<commit_msg>Load Buddy JSON file from absolute path<commit_after>import json
import logging
import os

import pytest
import responses

from flash_services.buddy import Buddy
from flash_services.core import Service


@pytest.fixture
def service():
    return Buddy(api_token='<PASSWORD>', domain='bar', project_name='baz', pipeline_id=123)


@pytest.fixture
def buddy_json():
    """Example from https://buddy.works/docs/api/pipelines/executions/list."""
    here = os.path.dirname(__file__)
    with open('{}/buddy.json'.format(here)) as json_file:
        return json.load(json_file)


def test_buddy_service_type():
    assert issubclass(Buddy, Service)


def test_correct_config():
{'fraction_non_alphanumeric': 0.11298076923076923, 'fraction_numerical': 0.004807692307692308, 'mean_word_length': 5.183168316831683, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6845409', 'n_tokens_mistral': 407, 'n_tokens_neox': 395, 'n_words': 95}