Your IP : 216.73.216.52


Current Path : /opt/alt/python35/lib64/python3.5/test/test_email/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/test/test_email/__pycache__/test_pickleable.cpython-35.pyc



��Yf�	�@s�ddlZddlZddlZddlZddlZddlZddlmZddlmZddl	m
Z
mZeGdd�de
��ZeGdd�de
��Z
ed	kr�ej�dS)
�N)�policy)�HeaderRegistry)�
TestEmailBase�parameterizec	@s^eZdZe�Zedd�ZddddddddiZd	d
�Zdd�Zd
S)�TestPickleCopyHeader�subject�this is a test�from�frodo@mordor.net�to�a: k@b.com, y@z.com;, j@f.com�date�Tue, 29 May 2012 09:24:26 +1000cCsA|j||�}tj|�}|jt|�t|��dS)N)�header_factory�copy�deepcopy�assertEqual�str)�self�name�value�header�h�r�D/opt/alt/python35/lib64/python3.5/test/test_email/test_pickleable.py�header_as_deepcopysz'TestPickleCopyHeader.header_as_deepcopycCsq|j||�}xXttjd�D]C}tj||�}tj|�}|jt|�t|��q&WdS)N�)r�range�pickle�HIGHEST_PROTOCOL�dumps�loadsrr)rrrr�proto�prrrr�header_as_pickles
z%TestPickleCopyHeader.header_as_pickleN)rr)r	r
)rr)r
r)	�__name__�
__module__�__qualname__rrZunstructuredZ
header_paramsrr$rrrrrs	rc@s�eZdZiZejejd�dej	�fed<ej
jdej	�fed<deddd<deddd	<d
eddd<deddd
<eddjd�dd�Z
dd�ZdS)�TestPickleCopyMessagez�        Date: Tue, 29 May 2012 09:24:26 +1000
        From: frodo@mordor.net
        To: bilbo@underhill.org
        Subject: help

        I think I forgot the ring.
        rZparsedZcreatedzTue, 29 May 2012 09:24:26 +1000rZDatezfrodo@mordor.netZFromzbilbo@underhill.orgZTo�helpZSubjectzI think I forgot the ring.cCs/tj|�}|j|j�|j��dS)N)rrr�	as_string)r�msg�msg2rrr�msg_as_deepcopy@sz%TestPickleCopyMessage.msg_as_deepcopycCs_xXttjd�D]C}tj||�}tj|�}|j|j�|j��qWdS)Nr)rrrr r!rr*)rr+r"r#r,rrr�
msg_as_pickleDsz#TestPickleCopyMessage.msg_as_pickleN)r%r&r'Z
msg_params�emailZmessage_from_string�textwrap�dedentr�default�messageZMessageZset_payloadr-r.rrrrr('sr(�__main__)Zunittestr0rrr/Z
email.messagerZemail.headerregistryrZtest.test_emailrrrr(r%�mainrrrr�<module>s#