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__/notify_test.cpython-38.pyc
U

�]E�@sBdZddlZddlZddlZGdd�dej�Zedkr>e��dS)zTests for certbot.notify.�Nc@sZeZdZdZe�d�dd��Ze�d�e�d�dd���Ze�d�e�d�dd	���Zd
S)�NotifyTestszTests for the notifier.zcertbot.notify.smtplib.LMTPcCsPddlm}t��}||_|�|ddd��|�|jjd�|�|j	jd�dS)Nr��notify�Goose�auntrhody@example.com�The old grey goose is dead.�)
�certbot.notifyr�mock�	MagicMock�return_value�
assertTrue�assertEqualZconnect�
call_count�sendmail)�self�	mock_lmtpr�lmtp_obj�r�;/usr/lib/python3/dist-packages/certbot/tests/notify_test.py�test_smtp_successs
�zNotifyTests.test_smtp_successzcertbot.notify.subprocess.PopencCslddlm}t��}||_t�d�|j_t��}||_|�	|ddd��|�
|jjd�|�
|jjd�dS)Nrr�rrrr)
r	rr
rr�socket�errorr�side_effectr
rr�communicate�rZ
mock_popenrrr�procrrr�test_smtp_failures
�zNotifyTests.test_smtp_failurecCsxddlm}t��}||_t�d�|j_t��}||_t	d�|j
_|�|ddd��|�|jj
d�|�|j
j
d�dS)	Nrrrz.What we have here is a failure to communicate.rrrr)r	rr
rrrrrr�OSErrorrZassertFalserrrrrr�test_everything_fails#s
�z!NotifyTests.test_everything_failsN)	�__name__�
__module__�__qualname__�__doc__r
Zpatchrrr rrrrrs
	r�__main__)r$rZunittestr
ZTestCaserr!�mainrrrr�<module>s+

Anon7 - 2021