| Server IP : 118.27.122.248 / Your IP : 216.73.216.230 Web Server : Apache System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64 User : c9415830 ( 11735) PHP Version : 8.4.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python36/lib64/python3.6/test/test_email/__pycache__/ |
Upload File : |
3
�w2_� � @ s� d dl Z d dlZd dlZd dlmZmZ d dlmZ d dlm Z G dd� de �Z
G dd� d�Zd d
� ZG dd� dee �Z
d
d� Zdd� ZG dd� dee �Zedkr�ej� dS )� N)�Message�EmailMessage)�default)�
TestEmailBasec @ s: e Zd ZG dd� de�Zejjdd�Zdd� Z dd� Z
d S )
�TestCustomMessagec s e Zd Z� fdd�Z� ZS )zTestCustomMessage.MyMessagec s || _ t� j� d S )N)�check_policy�super�__init__)�self�policy)� __class__� �@/opt/alt/python36/lib64/python3.6/test/test_email/test_parser.pyr s z$TestCustomMessage.MyMessage.__init__)�__name__�
__module__�__qualname__r �
__classcell__r
r
)r r � MyMessage s r Zboo)�linesepc C s6 t jd| j| jd�}| j|| j� | j|j| j� d S )NzSubject: bogus
msg
)r )�email�message_from_stringr �MyPolicy�assertIsInstance�assertIsr )r
�msgr
r
r �7test_custom_message_gets_policy_if_possible_from_string s
zITestCustomMessage.test_custom_message_gets_policy_if_possible_from_stringc C s@ t jd�}tj|| j| jd�}| j|| j� | j|j| j� d S )NzSubject: bogus
msg
)r ) �io�StringIOr �message_from_filer r r r r )r
Zsource_filer r
r
r �5test_custom_message_gets_policy_if_possible_from_file s
zGTestCustomMessage.test_custom_message_gets_policy_if_possible_from_fileN)r r r r r r r �cloner r r r
r
r
r r s r c @ s4 e Zd Zdd� ZG dd� de�Zdd� Zdd� Zd S )
�TestParserBasec C sl xf| j D ]\}| j|jd��D |dtd�}| j|j� dddddddddg � | j|j� d� W d Q R X qW d S ) N)�parseru� Next-Line: not
broken
Null: not broken
Vertical-Tab: notbroken
Form-Feed: notbroken
File-Separator: notbroken
Group-Separator: notbroken
Record-Separator: notbroken
Line-Separator: not
broken
Paragraph-Separator: not
broken
)r � Next-Line� not
broken�Null�
not broken�Vertical-Tab�
notbroken� Form-Feed�
notbroken�File-Separator�
notbroken�Group-Separator�
notbroken�Record-Separator�
notbroken�Line-Separator� not
broken�Paragraph-Separator� not
broken� )r# r$ )r% r&