Nexus File Manager
v2.0
🏠
Dashboard
⚡
System
🌐
›
opt
›
alt
›
python38
›
lib64
›
python3.8
›
test
›
test_email
›
__pycache__
Quick:
⬆️ Parent
🌐 Root
🏠 Home
🌍 WWW
📁 Temp
⚙️ Etc
📤 Upload
📁 Create
⚡ WordPress Admin
🔄 Refresh
✏️ test_parser.cpython-38.opt-1.pyc
← Back
U i�f� � @ 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�e�� 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� �� d S �N)�check_policy�super�__init__)�self�policy�� __class__� �@/opt/alt/python38/lib64/python3.8/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� 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 �d�}tj|| j| jd�}| �|| j� | �|j| j� d S 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 sh | j D ]\}| j|jd��D |dtd�}| �|�� dddddd d ddg � | �|�� d � W 5 Q R X qd 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 )z Next-Lineu not broken)ZNullz not broken)zVertical-Tabz notbroken)z Form-Feedz notbroken)zFile-Separatorz notbroken)zGroup-Separatorz notbroken)zRecord-Separatorz notbroken)zLine-Separatoru not broken)zParagraph-Separatoru not broken� )�parsers�subTestr r ZassertEqual�itemsZget_payload)r r'