HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /lib/python3/dist-packages/certbot/plugins/__pycache__/
Upload File :
Current File : //lib/python3/dist-packages/certbot/plugins/__pycache__/dns_test_common.cpython-311.pyc
�

E��c�	��V�dZddlmZddlmZddlmZddlZddlZddlm	Z	ddl
mZddlm
Z
dd	lmZdd
lmZddlmZddlmZerdd
lmZneZdZej�ejd����ZGd�de��ZGd�d��Zdee efde ddfd�Z!dS)z'Base test class for DNS authenticators.�)�Any)�Mapping)�
TYPE_CHECKINGN)�mock)�
challenges)�achallenges)�
filesystem)�DNSAuthenticator)�	acme_util)�util)�Protocolzexample.comzrsa512_key.pemc�>�eZdZUdZeed<deddfd�Zdeddfd�ZdS)�_AuthenticatorCallableTestCasezMProtocol describing a TestCase able to call a real DNSAuthenticator instance.�auth�unused_args�returnNc��dS)zj
        See
        https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertTrue
        N���selfrs  �A/usr/lib/python3/dist-packages/certbot/plugins/dns_test_common.py�
assertTruez)_AuthenticatorCallableTestCase.assertTrue�����c��dS)zk
        See
        https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertEqual
        Nrrs  r�assertEqualz*_AuthenticatorCallableTestCase.assertEqual%rr)	�__name__�
__module__�__qualname__�__doc__r
�__annotations__rrrrrrrrsl�������W�W�
�����s��t��������������rrc�r�eZdZdZejejee	���Z
deddfd�Zdeddfd�Z
deddfd�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
    )�challb�domain�account_keyrrNc��|�t|j���t����dS)N)r�
isinstancer�	more_info�str�rs r�test_more_infoz$BaseAuthenticatorTest.test_more_info8s2�����
�4�9�#6�#6�#8�#8�#�>�>�?�?�?�?�?rc�x�|�|j�d��tjg��dS)Nzexample.org)rr�get_chall_prefr�DNS01r+s r�test_get_chall_prefz)BaseAuthenticatorTest.test_get_chall_pref;s4�������1�1�-�@�@�:�CS�BT�U�U�U�U�Urc���tj��}|j�|��|�dt
tjtj���dS)Nzpropagation-seconds)�type�default�help)r�	MagicMockr�add_parser_arguments�assert_any_call�int�ANY)r�ms  r�test_parser_argumentsz+BaseAuthenticatorTest.test_parser_arguments>sO���N�����	�&�&�q�)�)�)�	���/�c�4�8�RV�RZ��[�[�[�[�[r)rrrr r�"KeyAuthorizationAnnotatedChallengerr/�DOMAIN�KEY�achallrr,r0r;rrrr#r#,s���������<�[�
;���v�3�@�@�@�F�@�;�@��@�@�@�@�V�"@�V�T�V�V�V�V�\�$B�\�t�\�\�\�\�\�\rr#�values�pathrc���tj��}|D]
}||||<�t|d��5}|�|���ddd��n#1swxYwYt	j|d��dS)z�Write 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)�outfileNi�)�	configobj�	ConfigObj�open�writer	�chmod)r@rA�config�key�fs     rrHrHEs����
 �
"�
"�F��"�"���S�k��s���	
�d�D�	�	� �Q����Q����� � � � � � � � � � � ���� � � � ���T�5�!�!�!�!�!s�A�A�A)"r �typingrrrrE�josepy�jose�unittestr�acmer�certbotr�certbot.compatr	�certbot.plugins.dns_commonr
�
certbot.testsrr�	test_util�typing_extensionsr
�objectr=�JWKRSA�load�load_vectorr>rr#r*rHrrr�<module>r\s���-�-������������� � � � � � ���������������������������%�%�%�%�%�%�7�7�7�7�7�7�#�#�#�#�#�#�+�+�+�+�+�+���*�*�*�*�*�*�*��H�
��
�k���,�y�,�-=�>�>�?�?�������X����"\�\�\�\�\�\�\�\�2"�'�#�s�(�#�"�3�"�4�"�"�"�"�"�"r