403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/test/test_email/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/test/test_email/__pycache__/test_inversion.cpython-310.pyc
o

�9j��@s�dZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZmZdd�Z
eGd	d
�d
e��Zedkr>e��dSdS)z�Test the parser and generator are inverses.

Note that this is only strictly true if we are parsing RFC valid messages and
producing RFC valid messages.
�N)�policy�message_from_bytes)�EmailMessage)�BytesGenerator)�
TestEmailBase�parameterizecsP|��}|d��std��t|d�t|d����d��fdd�|D��S)NrzFirst line must contain texts
cs(g|]}t|��kr|�d�nd�qS)N�)�len)�.0�x��stripamt��5/usr/lib/python3.10/test/test_email/test_inversion.py�
<listcomp>s �zdedent.<locals>.<listcomp>)�
splitlines�strip�
ValueErrorr	�lstrip�join)�bstr�linesrrr�dedents
��rc@s^eZdZejZeZdd�Zed�fed�fd�Z	e
dd�e
dd	d
�e
ddd
�d�Zd
d�ZdS)�
TestInversioncCs<t|tjd�}t��}t|�}|�|�|�|��|�dS)N�r)	rr�SMTP�io�BytesIOr�flatten�assertEqual�getvalue)�self�msg�m�b�grrr�msg_as_input s

zTestInversion.msg_as_inputsl            From: abc@xyz.com
            X-Status: 
            Subject: test

            foo
            s�            Date: Tue, 06 Jun 2017 27:39:33 +0600
            From: abc@xyz.com
            Subject: timezones

            How do they work even?
            )�header_with_one_space_body�header_with_invalid_datea,This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
This is a test
)�payloada%xy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy a
xy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy a
xy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy a
xy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy a
xy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy axy a
�base64)r)�ctezquoted-printable)�
plain_text�base64_text�qp_textcKsl|��}d|d<d|d<d|d<|j|fi|��t|�}t||jd�}|�t|�|�|�|��|�dS)N�foo�From�bar�Tozpayload round trip test�Subjectr)�
_make_message�set_content�bytesrrr�get_content)r!r)�kwr"r$�msg2rrr�payload_as_bodyAszTestInversion.payload_as_bodyN)
�__name__�
__module__�__qualname__r�defaultr�messager&r�
msg_params�dict�payload_paramsr:rrrrrs	�

�r�__main__)�__doc__r�unittest�emailrr�
email.messager�email.generatorr�test.test_emailrrrrr;�mainrrrr�<module>s
2�

Youez - 2016 - github.com/yon3zu
LinuXploit