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_defect_handling.cpython-38.opt-1.pyc
← Back
U i�f�. � @ s� d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ G dd� d�ZG dd� dee�Z G d d � d ee�Z G dd� dee�Zed kr�e� � dS )� N)�policy)�errors)� TestEmailBasec @ s� e Zd ZejZdZejdd� �Zdd� Z dd� Z e�d�Z d d � Zdd� Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� ZdS ) �TestDefectsBaseFc c s d V d S �N� ��self�defectr r �I/opt/alt/python38/lib64/python3.8/test/test_email/test_defect_handling.py�_raise_point s zTestDefectsBase._raise_pointc C s� t �d�}| �tj�� | �|�}W 5 Q R X | jr6d S |�d�}| �t |d�� | � t| �|��d� | � | �|�d tj� d S )Na_ Subject: XX From: xx@xx.dk To: XX Mime-version: 1.0 Content-type: multipart/mixed; boundary="MS_Mac_OE_3071477847_720252_MIME_Part" --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: multipart/alternative; boundary="MS_Mac_OE_3071477847_720252_MIME_Part" --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable text --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: text/html; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable <HTML></HTML> --MS_Mac_OE_3071477847_720252_MIME_Part-- --MS_Mac_OE_3071477847_720252_MIME_Part Content-type: image/gif; name="xx.gif"; Content-disposition: attachment Content-transfer-encoding: base64 Some removed base64 encoded chars. --MS_Mac_OE_3071477847_720252_MIME_Part-- r �defects� )�textwrap�dedentr r �StartBoundaryNotFoundDefect�_str_msg�raise_expected�get_payload� assertTrue�hasattr�assertEqual�len�get_defects�assertIsInstance)r �source�msg�innerr r r �test_same_boundary_inner_outer s % �z.TestDefectsBase.test_same_boundary_inner_outerc C s� t �d�}| �tj�� | �|�}W 5 Q R X | jr6d S | �|�� t � | � t| �|��d� | �| �|�d tj� | �| �|�d tj � d S )Na� Date: Fri, 6 Apr 2001 09:23:06 -0800 (GMT-0800) From: foobar Subject: broken mail MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; --JAB03225.986577786/zinfandel.lacita.com One part --JAB03225.986577786/zinfandel.lacita.com Content-Type: message/delivery-status Header: Another part --JAB03225.986577786/zinfandel.lacita.com-- � r r )r r r r �NoBoundaryInMultipartDefectr r r r �strr r r �!MultipartInvariantViolationDefect�r r r r r r �test_multipart_no_boundaryA s ��z*TestDefectsBase.test_multipart_no_boundarya^ Date: Wed, 14 Nov 2007 12:56:23 GMT From: foo@bar.invalid To: foo@bar.invalid Subject: Content-Transfer-Encoding: base64 and multipart MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3344438784458119861=="{} --===============3344438784458119861== Content-Type: text/plain Test message --===============3344438784458119861== Content-Type: application/octet-stream Content-Transfer-Encoding: base64 YWJj --===============3344438784458119861==-- c C sf | � tj�� | �| j�d��}W 5 Q R X | jr4d S | �t| � |��d� | � | � |�d tj� d S )Nz" Content-Transfer-Encoding: base64r r )r r Z-InvalidMultipartContentTransferEncodingDefectr � multipart_msg�formatr r r r r �r r r r r �test_multipart_invalid_cteu s ��� �z*TestDefectsBase.test_multipart_invalid_ctec C s6 | j r d S | �| j�d��}| �t| �|��d� d S )N� r �r r r% r&