KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.41 (Ubuntu)
System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
User : www-data ( 33)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  /lib/python3/dist-packages/certbot/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/certbot/tests/__pycache__/renewal_test.cpython-38.pyc
U

e�_�@s�dZddlZddlZddlmZddlmZddlmZddlmZddl	m
mZGdd�dej
�ZGd	d
�d
ej
�Zedkr�e��dS)zTests for certbot.renewal�N)�
challenges)�
configuration)�errors)�storagec@s0eZdZe�d�dd��Ze�d�dd��ZdS)�RenewalTestzcertbot.cli.set_by_clicCs|d|_t�|jjd�}d|j_d|j_d|j_t�	|j�}t
�||�}|jd}ddlm
}|�||�|�|jdg�dS)NFzsample-renewal-ancient.conf�
renewalparamsr��renewalz	/var/www/)�return_value�	test_utilZmake_lineage�configZ
config_dirZaccountZemail�webroot_pathrZNamespaceConfigrZ
RenewableCert�certbotr	�_restore_webroot_config�assertEqual)�self�mock_set_by_cliZrc_pathrZlineagerr	�r�</usr/lib/python3/dist-packages/certbot/tests/renewal_test.py�!test_ancient_webroot_renewal_confs�
z-RenewalTest.test_ancient_webroot_renewal_conf�certbot.renewal.cli.set_by_clicCs�ddlm}d|_ddiddgd�}|�|j|�|�|jjddi�|�|jjddg�idd�}|�|j|�|�|jji�|�|jjdg�dS)NrrFztest.example.comz
/var/www/testz/var/www/other)�webroot_mapr
)rr	r
rrrrr
)rrr	rrrr� test_webroot_params_conservations��z,RenewalTest.test_webroot_params_conservationN)�__name__�
__module__�__qualname__�mock�patchrrrrrrrs
rc@s�eZdZdZedd��Ze�d�dd��Ze�d�dd��Z	e�d�d	d
��Z
e�d�dd��Ze�d�d
d��Ze�d�dd��Z
e�d�dd��Ze�d�dd��ZdS)�!RestoreRequiredConfigElementsTestz;Tests for certbot.renewal.restore_required_config_elements.cOsddlm}|||�S)Nr)� restore_required_config_elements)Zcertbot.renewalr)�cls�args�kwargsrrrr�_call9sz'RestoreRequiredConfigElementsTest._callrcCs.d|_|�|jddi�|�|jjdk�dS)NF�allow_subset_of_names�TrueT)r
r#r�
assertTruer$�rrrrr�"test_allow_subset_of_names_success>szDRestoreRequiredConfigElementsTest.test_allow_subset_of_names_successcCs(d|_ddi}|�tj|j|j|�dS)NFr$�maybe�r
ZassertRaisesr�Errorr#r�rrrrrr�"test_allow_subset_of_names_failureDs�zDRestoreRequiredConfigElementsTest.test_allow_subset_of_names_failurecCsFd|_dd�d�i}|�|j|�tjjtjjg}|�|jj	|�dS)NF�pref_challszhttp-01, dns�,)
r
�splitr#rrZHTTP01�typ�DNS01rr.�rrrZexpectedrrr�test_pref_challs_listKs
z7RestoreRequiredConfigElementsTest.test_pref_challs_listcCs:d|_ddi}|�|j|�tjjg}|�|jj|�dS)NFr.Zdns)r
r#rrr2r1rr.r3rrr�test_pref_challs_strSs

z6RestoreRequiredConfigElementsTest.test_pref_challs_strcCs(d|_ddi}|�tj|j|j|�dS)NFr.zfinding-a-shrubberyr*r,rrr�test_pref_challs_failure[sz:RestoreRequiredConfigElementsTest.test_pref_challs_failurecCs.d|_|�|jddi�|�|jjdk�dS)NF�must_stapler%T)r
r#rr&r7r'rrr�test_must_staple_successasz:RestoreRequiredConfigElementsTest.test_must_staple_successcCs(d|_ddi}|�tj|j|j|�dS)NFr7r)r*r,rrr�test_must_staple_failuregs�z:RestoreRequiredConfigElementsTest.test_must_staple_failurecCsHddlm}d|j_d|_|�|jd|ji�|�|jj|jd�dS)Nr)�	constantsF�server)	rr:rr;r
r#ZV1_URIrZCLI_DEFAULTS)rrr:rrr� test_ancient_server_renewal_confns
zBRestoreRequiredConfigElementsTest.test_ancient_server_renewal_confN)rrr�__doc__�classmethodr#rrr(r-r4r5r6r8r9r<rrrrr7s&







r�__main__)r=ZunittestrZacmerrrrrZcertbot.tests.utilZtests�utilrZConfigTestCaserrr�mainrrrr�<module>s)@

Anon7 - 2021