Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/test_email/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/test_email/__pycache__/test_parser.cpython-310.pyc
o

�9j��@s�ddlZddlZddlZddlmZmZddlmZddlm	Z	Gdd�de	�Z
Gdd�d�Zd	d
�ZGdd�dee	�Z
d
d�Zdd�ZGdd�dee	�ZedkrWe��dSdS)�N)�Message�EmailMessage)�default)�
TestEmailBasec@s:eZdZGdd�de�Zejjdd�Zdd�Z	dd�Z
d	S)
�TestCustomMessagecseZdZ�fdd�Z�ZS)zTestCustomMessage.MyMessagecs||_t���dS�N)�check_policy�super�__init__)�self�policy��	__class__��2/usr/lib/python3.10/test/test_email/test_parser.pyr
sz$TestCustomMessage.MyMessage.__init__)�__name__�
__module__�__qualname__r
�
__classcell__rrr
r�	MyMessagesr�boo)�linesepcCs6tjd|j|jd�}|�||j�|�|j|j�dS�NzSubject: bogus

msg
�r)�email�message_from_stringr�MyPolicy�assertIsInstance�assertIsr)r�msgrrr�7test_custom_message_gets_policy_if_possible_from_strings�zITestCustomMessage.test_custom_message_gets_policy_if_possible_from_stringcCs@t�d�}tj||j|jd�}|�||j�|�|j|j�dSr)	�io�StringIOr�message_from_filerrrrr)r�source_filerrrr�5test_custom_message_gets_policy_if_possible_from_files
�zGTestCustomMessage.test_custom_message_gets_policy_if_possible_from_fileN)rrrrrrr�clonerr r%rrrrr	s
rc@s4eZdZdd�ZGdd�de�Zdd�Zdd�Zd	S)
�TestParserBasec	Csn|jD]1}|j|jd�� |dtd�}|�|��gd��|�|��d�Wd�n1s/wYqdS)N��parseru�Next-Line: not…broken
Null: notbroken
Vertical-Tab: notbroken
Form-Feed: notbroken
File-Separator: notbroken
Group-Separator: notbroken
Record-Separator: notbroken
Line-Separator: not
broken
Paragraph-Separator: not
broken

r)	)z	Next-Lineunot…broken)�Nullz
notbroken)zVertical-Tabz
notbroken)z	Form-Feedz
notbroken)zFile-Separatorz
notbroken)zGroup-Separatorz
notbroken)zRecord-Separatorz
notbroken)zLine-Separatorunot
broken)zParagraph-Separatorunot
broken�)�parsers�subTestrr�assertEqual�items�get_payload)rr)rrrr�test_only_split_on_cr_lf&s

�
���z'TestParserBase.test_only_split_on_cr_lfc@seZdZdS)zTestParserBase.MyMessageN)rrrrrrrrFsrc	Csf|jD]-}|j|jd��tj|jd�}|d|d�}|�||j�Wd�n1s+wYqdS�Nr()�message_factoryz
To: foo

testr)r,r-rrr&rr�rr)rrrrr�%test_custom_message_factory_on_policyIs
���z4TestParserBase.test_custom_message_factory_on_policyc	Cst|jD]4}|j|jd��#tj|jd�}|dt|d�}|�||j�|�|t�Wd�n1s2wYqdSr2)	r,r-rrr&rr�assertNotIsInstancerr4rrr�!test_factory_arg_overrides_policyPs
���z0TestParserBase.test_factory_arg_overrides_policyN)rrrr1rrr5r7rrrrr'$s
 r'cOs"t�|�}tj|g|�Ri|��Sr)r!r"rr#��s�args�kw�frrrr#[s
r#c@seZdZejefZdS)�
TestParserN)rrrrrr#r,rrrrr=_sr=cOstj|��g|�Ri|��Sr)r�message_from_bytes�encode)r9r:r;rrrr>bsr>cOs&t�|���}tj|g|�Ri|��Sr)r!�BytesIOr?r�message_from_binary_filer8rrrrAesrAc@seZdZeefZdS)�TestBytesParserN)rrrr>rAr,rrrrrBisrB�__main__)r!r�unittest�
email.messagerr�email.policyr�test.test_emailrrr'r#r=r>rArBr�mainrrrr�<module>s 7�

Youez - 2016 - github.com/yon3zu
LinuXploit