AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/mail/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/mail/test/__pycache__/test_bounce.cpython-310.pyc
o

�b��@sNddlZddlZddlmZmZddlmZddlm	Z	Gdd�de	j
�ZdS)�N)�BytesIO�StringIO)�bounce)�unittestc@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
�BounceTestsz#
    Bounce message generation
    cCs�t�td�dd�\}}}|�|d�|�|d�tj��}|�t|�d���}|�|dd�|�|dd	�|�|d
d�dS)
zN
        L{twisted.mail.bounce.generateBounce} can accept L{unicode}.
        zRFrom: Moshe Zadka <moshez@example.com>
To: nonexistent@example.org
Subject: test

�moshez@example.com�nonexistent@example.org��moshez@example.com�utf-8�To�From�postmaster@example.org�subject�)Returned Mail: see transcript for detailsN)	r�generateBouncer�assertEqual�email�parser�Parser�parse�decode��self�fromAddress�to�s�emailParser�mess�r�?/usr/lib/python3/dist-packages/twisted/mail/test/test_bounce.py�test_bounceMessageUnicode��
�
z%BounceTests.test_bounceMessageUnicodecCs�t�td�dd�\}}}|�|d�|�|d�tj��}|�t|�	d���}|�|dd�|�|dd	�|�|d
d�dS)
zL
        L{twisted.mail.bounce.generateBounce} can accept L{bytes}.
        �RFrom: Moshe Zadka <moshez@example.com>
To: nonexistent@example.org
Subject: test

r
�nonexistent@example.orgr	rrrr
rrrN)
rrrrrrrrrrrrrr �test_bounceMessageBytes)r"z#BounceTests.test_bounceMessageBytescCs�t�td�ddd�\}}}|�|d�|�|d�tj��}|�t|�	d���}|�|dd�|�|d	d
�|�|dd�|�
|���|��}|�|d
��d�dS)z\
        Pass a custom transcript message to L{twisted.mail.bounce.generateBounce}.
        r#r
r$zCustom transcriptr	rrrr
rrrrzCustom transcript
N)
rrrrrrrrrr�
assertTrue�is_multipart�get_payload)rrrrrr�partsrrr �"test_bounceMessageCustomTranscriptAs$�
�

z.BounceTests.test_bounceMessageCustomTranscriptcCs�t�|||�dd�\}}}tj��}|�t|�d���}|�|dd�|�|dd�|�|dd�|�	|�
��|��}	|	d	��}
t|t
�rP|�d�}|�|
d
��d|�dS)
zU
        Pass a really big message to L{twisted.mail.bounce.generateBounce}.
        rrrrr
rrr�r�
N)rrrrrrrrrr&r'r(�
isinstance�bytes)r�header�message�ioTyperrrrrr)�innerMessagerrr �_bounceBigMessage]s
�


zBounceTests._bounceBigMessagecCs2d}|�|ddt�|�|�d�ddt�dS)zj
        L{twisted.mail.bounce.generateBounce} with big L{unicode} and
        L{bytes} messages.
        r#s
Test test
i'rz
More test
N)r3rrr)rr/rrr �test_bounceBigMessagepsz!BounceTests.test_bounceBigMessageN)	�__name__�
__module__�__qualname__�__doc__r!r%r*r3r4rrrr rsr)�
email.messager�email.parser�iorr�twisted.mailr�
twisted.trialr�TestCaserrrrr �<module>s

Anon7 - 2022
AnonSec Team