<commit_before>"""Tests the Python interface for DomainTools APIs"""
from os import environ
from datetime import datetime

import pytest
from domaintools import API, exceptions

from tests.settings import api, vcr


@vcr.use_cassette
def test_account_information():
    with api.account_information() as account_information:
        assert 'products' in account_information
        for product in account_information:
            assert 'id' in product
            assert 'per_month_limit' in product
            assert 'absolute_limit' in product
            assert 'usage' in product
            assert 'expiration_date' in product


@vcr.use_cassette
def test_available_api_calls():
    available_api_calls = api.available_api_calls()
    # Not sure what else to check for as this is highly dependent on your API_KEY but at least account_information
    # should be there.<commit_msg>Update test_api.py<commit_after>"""Tests the Python interface for DomainTools APIs"""
from os import environ
from datetime import datetime

import pytest
from domaintools import API, exceptions

from tests.settings import api, vcr


@vcr.use_cassette
def test_account_information():
    with api.account_information() as account_information:
        assert 'products' in account_information
        for product in account_information:
            assert 'id' in product
            assert 'per_month_limit' in product
            assert 'absolute_limit' in product
            assert 'usage' in product
            assert 'expiration_date' in product
            assert 'proxies' in product


@vcr.use_cassette
def test_available_api_calls():
    available_api_calls = api.available_api_calls()
    # Not sure what else to check for as this is highly dependent on your API_KEY but at least account_information
    # should be there.
{'fraction_non_alphanumeric': 0.05222649807586586, 'fraction_numerical': 0.0, 'mean_word_length': 3.449877750611247, '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': '6841670', 'n_tokens_mistral': 469, 'n_tokens_neox': 470, 'n_words': 182}