<commit_before>"""
Integration tests for :mod:`acme.client`.
"""
from __future__ import print_function

from functools import partial
from os import getenv

from acme.jose import JWKRSA
from acme.messages import NewRegistration, STATUS_PENDING
from cryptography.hazmat.primitives import serialization
from eliot import start_action
from eliot.twisted import DeferredContext
from twisted.internet import reactor
from twisted.internet.defer import succeed
from twisted.internet.endpoints import serverFromString
from twisted.python.compat import _PY3
from twisted.python.filepath import FilePath
from twisted.trial.unittest import TestCase
from twisted.web.resource import Resource
from twisted.web.server import Site
from txsni.snimap import SNIMap
from txsni.tlsendpoint import TLSEndpoint

from txacme.challenges import LibcloudDNSResponder, TLSSNI01Responder
from txacme.client import (
    answer_challenge, Client, fqdn_identifier, poll_until_valid)
from txacme.messages import CertificateRequest
from txacme.testing import FakeClient, NullResponder
from txacme.urls import LETSENCRYPT_STAGING_DIRECTORY
from txacme.util import csr_for_names, generate_private_key, tap


class ClientTestsMixin(object):
    """
    Integration tests for the ACME client.<commit_msg>Fix integration tests too.<commit_after>"""
Integration tests for :mod:`acme.client`.
"""
from __future__ import print_function

from functools import partial
from os import getenv

from acme.jose import JWKRSA
from acme.messages import NewRegistration, STATUS_PENDING
from cryptography.hazmat.primitives import serialization
from eliot import start_action
from eliot.twisted import DeferredContext
from twisted.internet import reactor
from twisted.internet.defer import succeed
from twisted.internet.endpoints import serverFromString
from twisted.python.compat import _PY3
from twisted.python.filepath import FilePath
from twisted.trial.unittest import TestCase
from twisted.web.resource import Resource
from twisted.web.server import Site
from txsni.snimap import SNIMap
from txsni.tlsendpoint import TLSEndpoint

from txacme.challenges import TLSSNI01Responder
from txacme.client import (
    answer_challenge, Client, fqdn_identifier, poll_until_valid)
from txacme.messages import CertificateRequest
from txacme.testing import FakeClient, NullResponder
from txacme.urls import LETSENCRYPT_STAGING_DIRECTORY
from txacme.util import csr_for_names, generate_private_key, tap


try:
    from txacme.challenges import LibcloudDNSResponder
except ImportError:
    pass


class ClientTestsMixin(object):
    """
    Integration tests for the ACME client.
{'fraction_non_alphanumeric': 0.046946564885496186, 'fraction_numerical': 0.0022900763358778627, 'mean_word_length': 6.341736694677871, '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': '2111307', 'n_tokens_mistral': 777, 'n_tokens_neox': 741, 'n_words': 243}