File: //opt/alt/python312/lib64/python3.12/test/test_email/__pycache__/test_inversion.cpython-312.pyc
�
}h�e� � � � d Z ddlZddlZddlmZmZ ddlmZ ddlm Z ddl
mZmZ d� Z
e G d� d e� � Zed
k( r ej � yy)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�parameterizec �" � | j � }|d j � st d� �t |d � t |d j � � z
}dj |D �cg c] }t |� |k\ r||d nd�� c}� S c c}w )Nr zFirst line must contain texts
� )�
splitlines�strip�
ValueError�len�lstrip�join)�bstr�lines�stripamt�xs �E/opt/alt/python312/lib64/python3.12/test/test_email/test_inversion.py�dedentr s� � ��O�O��E���8�>�>���7�8�8��5��8�}�s�5��8�?�?�#4�5�5�H��<�<�� �� �Q���)��8�9��s� 2� �� �� s �)Bc � � e Zd Zej ZeZd� Z ed� f ed� fd�Z e
d�� e
dd� � e
dd
� � d�Zd� Zy
)�
TestInversionc �� � t |t j �� }t j � }t |� }|j
|� | j |j � |� y )N�r ) r r �SMTP�io�BytesIOr �flatten�assertEqual�getvalue)�self�msg�m�b�gs r �msg_as_inputzTestInversion.msg_as_input sH � ��s�6�;�;�7���J�J�L���1��� � � �!���������s�+r
sl 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_textc �" � | j � }d|d<