HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/test/test_email/__pycache__/test_inversion.cpython-311.pyc
�

��VcC	���dZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZmZd�Z
eGd�d	e����Zed
krej��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�parameterizec�:��|���}|d���std���t|d��t|d�����z
�d��fd�|D����S)NrzFirst line must contain texts
c�N��g|]!}t|���kr
|�d�nd��"S)N�)�len)�.0�x�stripamts  ��2D:\Python311\Lib\test\test_email\test_inversion.py�
<listcomp>zdedent.<locals>.<listcomp>sE���	�	�	���Q����)�	2��8�9�9���s�	�	�	r)�
splitlines�strip�
ValueErrorr�lstrip�join)�bstr�linesrs  @r�dedentrs�����O�O���E���8�>�>���9��7�8�8�8��5��8�}�}�s�5��8�?�?�#4�#4�5�5�5�H��<�<�	�	�	�	��	�	�	���rc��eZdZejZeZd�Zed��fed��fd�Z	e
d���e
dd�	��e
dd
�	��d�Zd�Zd
S)�
TestInversionc��t|tj���}tj��}t|��}|�|��|�|���|��dS)N�r)	rr�SMTP�io�BytesIOr�flatten�assertEqual�getvalue)�self�msg�m�b�gs     r�msg_as_inputzTestInversion.msg_as_input sa���s�6�;�7�7�7���J�L�L���1����	�	�	�!������������s�+�+�+�+�+rsl            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�H�|���}d|d<d|d<d|d<|j|fi|��t|��}t||j���}|�t|��|��|�|���|��dS)N�foo�From�bar�Tozpayload round trip test�Subjectr)�
_make_message�set_content�bytesrrr"�get_content)r$r,�kwr%r'�msg2s      r�payload_as_bodyzTestInversion.payload_as_bodyAs���� � �"�"����F����D�	�2��I������&�&�2�&�&�&��#�J�J��!�!�D�K�8�8�8������t���a�(�(�(�����)�)�+�+�W�5�5�5�5�5rN)
�__name__�
__module__�__qualname__r�defaultr�messager)r�
msg_params�dict�payload_paramsr>�rrrrs��������^�F��G�,�,�,�(.�v�/�(�(�'�&,�V�-�&�&�%���J�(�d�#8�9�9�9��t�%7�h�G�G�G��4�!3�:L�M�M�M�
�
�N�	6�	6�	6�	6�	6rr�__main__)�__doc__r�unittest�emailrr�
email.messager�email.generatorr�test.test_emailrrrrr?�mainrGrr�<module>rPs�����
�	�	�	�����,�,�,�,�,�,�,�,�&�&�&�&�&�&�*�*�*�*�*�*�7�7�7�7�7�7�7�7�����/6�/6�/6�/6�/6�M�/6�/6���/6�d�z����H�M�O�O�O�O�O��r