<commit_before><commit_msg>add basic unit test for RESTApiJWTClient.get #343<commit_after>import requests_mock

from osmaxx.api_client.API_client import RESTApiJWTClient


def test_get_performs_request():
    with requests_mock.mock() as r_mock:
        r_mock.get(
            # Expected request:
            'http://example.com/service/uri_base/get/example',
            request_headers={'Content-Type': 'application/json; charset=UTF-8'},

            # Response if request matched:
            json={'some response': 'you got it'}
        )
        c = RESTApiJWTClient('http://example.com/service/uri_base/')
        response = c.get('get/example')
        assert response.json() == {'some response': 'you got it'}
{'fraction_non_alphanumeric': 0.12239221140472879, 'fraction_numerical': 0.005563282336578581, 'mean_word_length': 2.9344262295081966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '6527751', 'n_tokens_mistral': 217, 'n_tokens_neox': 210, 'n_words': 45}