Current File : //usr/lib/python3/dist-packages/twisted/mail/test/__pycache__/test_bounce.cpython-312.pyc |
�
Ϫ�f� � � � d dl mZ d dlZd dlZd dlmZmZ d dlm Z m
Z
mZ d dlm
Z
d dlmZ G d� dej � Zy) � )�annotationsN)�BytesIO�StringIO)�IO�AnyStr�Callable)�bounce)�unittestc �H � e Zd ZdZdd�Zdd�Zdd�Z d d�Zdd�Zy)
�BounceTestsz#
Bounce message generation
c � � t j t d� dd� \ }}}| j |d� | j |d� t j
j
� }|j t |j d� � � }| j |d d� | j |d d � | j |d
d� y)
zN
L{twisted.mail.bounce.generateBounce} can accept L{unicode}.
zRFrom: Moshe Zadka <moshez@example.com>
To: nonexistent@example.org
Subject: test
�moshez@example.com�nonexistent@example.org� � moshez@example.com�utf-8�To�From�postmaster@example.org�subject�)Returned Mail: see transcript for detailsN) r �generateBouncer �assertEqual�email�parser�Parser�parse�decode��self�fromAddress�to�s�emailParser�messs �?/usr/lib/python3/dist-packages/twisted/mail/test/test_bounce.py�test_bounceMessageUnicodez%BounceTests.test_bounceMessageUnicode s� � � $�2�2���
�
!�%�
���R��
����c�*�����2�3��l�l�)�)�+��� � ��!�(�(�7�*;�!<�=������d��%9�:�����f��'?�@�����i��*U�Vr c � � t j t d� dd� \ }}}| j |d� | j |d� t j
j
� }|j t |j d� � � }| j |d d� | j |d d � | j |d
d� y)
zL
L{twisted.mail.bounce.generateBounce} can accept L{bytes}.
�R From: Moshe Zadka <moshez@example.com>
To: nonexistent@example.org
Subject: test
r � nonexistent@example.orgr r r r r r r r N)
r r r r r r r r r r r s r&