%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/mail/test/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/mail/test/__pycache__/test_imap.cpython-312.pyc |
� Ϫ�f�! � �� � d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl m Z ddlmZ ddl mZ ddlmZmZ ddlmZ dd lmZ dd lmZmZ ddlmZ ddlmZmZmZ dd lm Z ddl!m"Z"m#Z# ddl$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5m6Z6m7Z7 ddl8m9Z9 ddl:m;Z;m<Z<m=Z= ddl>m?Z?m@Z@mAZA ddlBmCZCmDZD ddlEmFZFmGZG d� ZI G d� deD� ZJ G d� d� ZK G d � d!eC� ZL G d"� d#eC� ZM G d$� d%eD� ZN ee1j� e1j� e1j� � G d&� d'� � ZR ee1j� e1j� � G d(� d)� � ZS G d*� d+e1j� � ZU G d,� d-eUe1j� � ZW G d.� d/e1j� � ZY G d0� d1e1j� � Z[ G d2� d3� Z\ G d4� d5e\eD� Z] G d6� d7eC� Z^ G d8� d9e\eD� Z_ ee"� G d:� d;� � Z` G d<� d=� Za G d>� d?e\eD� Zb G d@� dAeD� Zc G dB� dCe\eD� Zd G dD� dEeD� Ze G dF� dGe1j� � Zf G dH� dIe\eD� Zg G dJ� dK� Zh G dL� dMeh� Zi G dN� dOeieC� Zj G dP� dQeieC� Zk G dR� dSeheC� Zl G dT� dUeheC� Zm G dV� dWeheC� Zn G dX� dYeheD� Zo G dZ� d[eheC� Zp G d\� d]eheC� Zq G d^� d_e1j� � Zr ee1j� � G d`� dae=j� � � Zu G db� dceDe\� Zv G dd� deeD� Zw G df� dgeDe\� Zx G dh� die\eD� Zy ee1j� � G dj� dkeDe\� � Z{ G dl� dm� Z| ee1j� � G dn� do� � Z~ ee1j� � G dp� dq� � Z� G dr� dseD� Z� eeF dt� e e'�j e(d� du� G dv� dwe\eD� � � Z� G dx� dyeR� Z� G dz� d{e\eD� Z� G d|� d}eD� Z� G d~� d� Z� G d�� d�eD� Z� G d�� d�eD� Z� G d�� d�� Z� G d�� d�e�eC� Z� G d�� d�e�eD� Z� G d�� d�eC� Z�y# eH$ r dZFdZGY ���w xY w)�z" Test case for twisted.mail.imap4 � )�annotationsN)�OrderedDict��BytesIO)�chain)�Optional�Type)�skipIf)�implementer)�verifyClass�verifyObject)�'InMemoryUsernamePasswordDatabaseDontUse)�CramMD5Credentials�IUsernameHashedPassword�IUsernamePassword��UnauthorizedLogin)�IRealm�Portal)�defer�error� interfaces�reactor)�Deferred)�Clock)�StringTransport� StringTransportWithDisconnection)�imap4)� MessageSet)�IChallengeResponse�IClientAuthentication�ICloseableMailboxIMAP)�loopback)�failure�log�util)� iterbytes�nativeString� networkString)�SynchronousTestCase�TestCase)�ClientTLSContext�ServerTLSContextc � � | fd�S )Nc � � |� S �N� )�result�fs �=/usr/lib/python3/dist-packages/twisted/mail/test/test_imap.py�<lambda>zstrip.<locals>.<lambda>: s � �q�s� � r1 )r3 s r4 �stripr7 9 s � ��"�"r6 c �d � e Zd Zddgddgddgddgd d ggZd� Zd� Zd � Zd� Zd� Zd� Z d� Z d� Zd� Zy)�IMAP4UTF7Tests�Hello world� Hello worldz Hello & worlds Hello &- world� Helloÿworld� Hello&AP8-worldu ÿþýüs &AP8A,gD9APw-u ~peter/mail/日本語/台北s ~peter/mail/&ZeVnLIqe-/&U,BTFw-c �j � d}| j |j dd� |j d� � y)z� Specifying an error policy to C{unicode.encode} with the I{imap4-utf-7} codec should produce the same result as not specifying the error policy. r: �imap4-utf-7�strictN��assertEqual�encode��self�texts r4 �test_encodeWithErrorsz$IMAP4UTF7Tests.test_encodeWithErrorsI s0 � � ������K�K� �x�0�$�+�+�m�2L� r6 c �j � d}| j |j dd� |j d� � y)zO Similar to L{test_encodeWithErrors}, but for C{bytes.decode}. r; r? r@ N�rB �decode�rE �bytess r4 �test_decodeWithErrorsz$IMAP4UTF7Tests.test_decodeWithErrorsT s0 � � ������L�L���1�5�<�<� �3N� r6 c �J � d}| j |j d� d� y)z� Unicode strings that contain an ampersand (C{&}) can be encoded to bytes with the I{imap4-utf-7} codec. u &Hello&½&r? s &-Hello&-&AL0-&-NrA rD s r4 �test_encodeAmpersandz#IMAP4UTF7Tests.test_encodeAmpersand] s&