txacme.test.test_client module¶
-
class
txacme.test.test_client.ClientTests(*args, **kwargs)[source]¶ Clientprovides a client interface for the ACME API.-
test_answer_challenge()[source]¶ answer_challengeresponds to a challenge and returns the updated challenge.
-
test_answer_challenge_function()[source]¶ The challenge is found in the responder after invoking
answer_challenge.
_parse_authorizationraisesClientErrorif the"next"link is missing.
_check_authorizationraisesUnexpectedUpdateif the return identifier doesn’t match.
-
test_challenge_missing_link()[source]¶ _parse_challengeraisesClientErrorif the"up"link is missing.
-
test_challenge_unexpected_uri()[source]¶ _check_challengeraisesUnexpectedUpdateif the challenge does not have the expected URI.
-
test_default_client()[source]¶ ~txacme.client._default_clientconstructs a client if one was not provided.
-
test_directory_url_type()[source]¶ from_urlexpects atwisted.python.url.URLinstance for theurlargument.
-
test_expect_response_wrong_code()[source]¶ _expect_responseraisesClientErrorif the response code does not match the expected code.
-
test_fetch_chain_empty()[source]¶ If a certificate has no issuer link,
Client.fetch_chainreturns an empty chain.
-
test_fetch_chain_okay()[source]¶ A certificate chain that is shorter than the max length is returned.
-
test_fetch_chain_too_long()[source]¶ A certificate chain that is too long fails with
ClientError.
-
test_fqdn_identifier()[source]¶ fqdn_identifierconstructs anIdentifierof the right type.
-
test_from_directory()[source]¶ from_url()constructs a client with a directory retrieved from the given URL.
-
test_no_tls_sni_01()[source]¶ If no tls-sni-01 challenges are available,
NoSupportedChallengesis raised.
-
test_poll()[source]¶ pollretrieves the latest state of an authorization resource, as well as the minimum time to wait before polling the state again.
-
test_poll_invalid()[source]¶ If the authorization enters an invalid state while polling,
poll_until_validwill fail withAuthorizationFailed.
-
test_poll_timeout()[source]¶ If the timeout is exceeded during polling,
poll_until_validwill fail withCancelledError.
-
test_poll_valid()[source]¶ If the authorization enters a valid state while polling,
poll_until_validwill fire with the updated authorization.
-
test_register_bad_nonce_once()[source]¶ If a badNonce error is received, we clear all old nonces and retry the request once.
-
test_register_bad_nonce_twice()[source]¶ If a badNonce error is received on a retry, fail the request.
-
test_register_error()[source]¶ If some other error occurs during registration, a
txacme.client.ServerErrorresults.
-
test_register_existing()[source]¶ If registration fails due to our key already being registered, the existing registration is returned.
-
test_register_existing_update()[source]¶ If registration fails due to our key already being registered, the existing registration is updated.
-
test_register_missing_next()[source]¶ If the directory does not return a
"next"link, aClientErrorfailure occurs.
-
test_request_challenges()[source]¶ request_challenges()creates a new authorization, and returns the authorization resource with a list of possible challenges to proceed with.
-
test_tls_sni_01_no_singleton()[source]¶ If a suitable singleton challenge is not found,
NoSupportedChallengesis raised.
-
test_unexpected_update()[source]¶ If the server does not return the registration we expected, an
UnexpectedUpdatefailure occurs.
-
-
class
txacme.test.test_client.ExtraCoverageTests(*args, **kwargs)[source]¶ Tests to get coverage on some test helpers that we don’t really want to maintain ourselves.