File "dns_test_common.cpython-36.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/usr/lib/python3.6/site-packages/certbot/plugins/__pycache__/dns_test_common.cpython-36.pyc
File size: 3.35 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

3

گac
@sdZddlmZddlmZddlmZddlZddlZddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZerddlmZneZyddlZWn ek
rdd
lmZYnXdZejjejdZGdddeZGdddZ ee!efe!ddddZ"dS)z'Base test class for DNS authenticators.)Any)Mapping)
TYPE_CHECKINGN)
challenges)achallenges)
filesystem)DNSAuthenticator)	acme_util)util)Protocol)mockzexample.comzrsa512_key.pemc@s6eZdZUdZeeddddZeddddZdS)_AuthenticatorCallableTestCasezMProtocol describing a TestCase able to call a real DNSAuthenticator instance.N)unused_argsreturncGsdS)zj
        See
        https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTrue
        N)selfrrr%/usr/lib/python3.6/dns_test_common.py
assertTrue$sz)_AuthenticatorCallableTestCase.assertTruecGsdS)zk
        See
        https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertEqual
        Nr)rrrrrassertEqual+sz*_AuthenticatorCallableTestCase.assertEqual)	__name__
__module____qualname____doc__rauthrrrrrrrr
 s
r
c@sReZdZdZejejee	dZ
eddddZeddddZ
eddd	d
ZdS)BaseAuthenticatorTestz
    A base test class to reduce duplication between test code for DNS Authenticator Plugins.

    Assumes:
     * That subclasses also subclass unittest.TestCase
     * That the authenticator is stored as self.auth
    )ZchallbZdomainZaccount_keyN)rrcCs|jt|jjtdS)N)r
isinstancerZ	more_infostr)rrrrtest_more_info?sz$BaseAuthenticatorTest.test_more_infocCs|j|jjdtjgdS)Nzexample.org)rrZget_chall_prefrDNS01)rrrrtest_get_chall_prefBsz)BaseAuthenticatorTest.test_get_chall_prefcCs.tj}|jj||jdttjtjddS)Nzpropagation-seconds)typedefaulthelp)rZ	MagicMockrZadd_parser_argumentsZassert_any_callintANY)rmrrrtest_parser_argumentsEsz+BaseAuthenticatorTest.test_parser_arguments)rrrrrZ"KeyAuthorizationAnnotatedChallenger	rDOMAINKEYZachallr
rrr&rrrrr3sr)valuespathrc
CsTtj}x|D]}||||<qWt|d}|j|dWdQRXtj|ddS)zWrite the specified values to a config file.

    :param dict values: A map of values to write.
    :param str path: Where to write the values.
    wb)ZoutfileNi)	configobjZ	ConfigObjopenwriterchmod)r)r*configkeyfrrrr.Ls
r.)#rZtypingrrrr,ZjosepyZjoseZacmerZcertbotrZcertbot.compatrZcertbot.plugins.dns_commonrZ
certbot.testsr	r
Z	test_utilZtyping_extensionsrobjectrImportErrorZunittestr'ZJWKRSAloadZload_vectorr(r
rrr.rrrr<module>s.