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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�w2_�'�@sdddlZddlZddlZddlZddlZejjd�Zdddddd�gd	d
dd�gd
d
dddd�gddd�gd	ddd�dddd�gddd�gddd	dd d!�gd"d	d#d$d%�gd&d'd�gd(d)d�gd*d+d�gd,d-dd.�gd&d/d�gd0�
Z	ej
e	�Zx*ej�D]Z
xe
D]Zejd1��qWq�WGd2d3�d3ej�ZGd4d5�d5ej�ZGd6d7�d7ej�Zed8k�r`ej�dS)9�Nzmailcap.txtz
moviemaker %sz""/usr/lib/Zmail/bitmaps/movie.xbm"z"Movie"zmovieplayer %s�)�composez
x11-bitmap�description�view�lineno�z?echo "This is \"%t\" but        is 50 \% Greek to me" \; cat %s�)�
copiousoutputrrzaudiocompose %sz"An audio fragment"zshowaudio %s�)�editrrrrzmpeg_play %s�
)rrzps-to-terminal %s�)�
needsterminalrrzidraw %s�)rrrzxdvi %s�z
extcompose %sz4"A reference to data stored in an external location"zQshowexternal %s %{access-type} %{name} %{site}     %{directory} %{mode} %{server}�
)�composetypedrrrrz?test "`echo     %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-8z)shownonascii iso-8859-8 -e richtext -p %s�)�testr	rrz
display %s�	z/usr/local/bin/showaudio %t�z
animate %s�z
"cat %s | lp"zshowframe %s)�printrr�)
zapplication/x-moviez
application/*zaudio/basicz
video/mpegzapplication/postscriptzapplication/x-dvizmessage/external-bodyz
text/richtextzimage/x-xwindowdumpzaudio/*zvideo/*zapplication/framez	image/rgbrc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�HelperFunctionTestc
Cs�tj�}|j|t�x|D]}|j|t�qWtjj��@}d|krT|djt	j
�}n ddg}t	j
j|�|d<tj�}WdQRX|j||�dS)N�MAILCAPSz/testdir1/.mailcapz/testdir2/mailcap)
�mailcap�listmailcapfiles�assertIsInstance�list�strr�support�EnvironmentVarGuard�split�os�pathsep�join�assertEqual)�selfZmcfiles�m�envZenv_mailcaps�r+�6/opt/alt/python36/lib64/python3.6/test/test_mailcap.py�test_listmailcapfilesEs
z(HelperFunctionTest.test_listmailcapfilescCsFttd��&}|jt��tj|�}WdQRXWdQRX|j|t�dS)N�r)�open�MAILCAPFILEZassertWarns�DeprecationWarningrZreadmailcapfile�assertDictEqual�MAILCAPDICT_DEPRECATED)r(�mcf�dr+r+r,�test_readmailcapfileXsz'HelperFunctionTest.test_readmailcapfilecCs�ddd�ddd�g}tjtd�}|j||�d}ddd	d
dd�g}tjtd
|�}|j||�ddiddig}tjtd�}|j||�dS)Nz
animate %sr)rrzmpeg_play %srz
video/mpegrzaudiocompose %sz"An audio fragment"zshowaudio %sr
)rrrrrzaudio/basicr)r�lookup�MAILCAPDICTZassertListEqualr3)r(ZexpectedZactual�keyr+r+r,�test_lookup_s
zHelperFunctionTest.test_lookupc
Cs�dddg}dddgdfdddgdfdddgd	fd
ddgdfdddgd
fddd|gdfd
dd|gdfg}x&|D]}|jtj|d�|d�qlWdS)Nzid=1znumber=2ztotal=3rzaudio/*zfoo.txtzecho foozecho %szecho foo.txtzecho %tzecho audio/*zecho \%tz
echo %{total}zecho 3rr
)r'rZsubst)r(�plistZ
test_casesZtcr+r+r,�
test_substus

zHelperFunctionTest.test_substN)�__name__�
__module__�__qualname__r-r6r:r<r+r+r+r,rCsrc@seZdZdd�Zdd�ZdS)�GetcapsTestc
Cs6tjj��"}t|d<tj�}|j|t�WdQRXdS)Nr)rr!r"r0r�getcapsr2r8)r(r*�capsr+r+r,�test_mock_getcaps�szGetcapsTest.test_mock_getcapscCs�tj�}|j|t�tj�}dd�|D�}|rxxT|j�D]:\}}|j|t�|j|t�x|D]}|j|t�q^Wq8Wn|ji|�dS)NcSsg|]}tjj|�r|�qSr+)r$�path�exists)�.0r4r+r+r,�
<listcomp>�sz3GetcapsTest.test_system_mailcap.<locals>.<listcomp>)	rrAr�dictr�itemsr rr')r(rBZmailcapfilesZexistingmcfiles�k�v�er+r+r,�test_system_mailcap�s
zGetcapsTest.test_system_mailcapN)r=r>r?rCrMr+r+r+r,r@�s	r@c@s6eZdZdd�Zejejdkd�dd��Zdd�Z	d	S)
�
FindmatchTestc	Cs:t}d}ddddddg}ddd	d
dd�}d
dd�}ddd�}dddddd�}idgid)f|dgid*f|dgid|ff|ddgid|ff|ddgid|ff|ddgid	|ff|dd gid+f|d!gd"|id||ff|ddgd"|id||ff|dgd|d#�d	|ff|d$gd"|id%|ff|d&gd'|id(|ffg}|j|�dS),Nzfoo.txtzaccess-type=defaultz	name=johnzsite=python.orgzdirectory=/tmpzmode=fooz
server=barzaudiocompose %sz"An audio fragment"zshowaudio %sr
)rrrrrz/usr/local/bin/showaudio %tr)rrz
animate %srz
extcompose %sz4"A reference to data stored in an external location"rzQshowexternal %s %{access-type} %{name} %{site}     %{directory} %{mode} %{server}r)rrrrrz
video/mpegzfoo/barzanimate /dev/nullzaudio/basicrzaudiocompose /dev/nullrrZfoobarzvideo/*�filename)r9rOzaudio/*z /usr/local/bin/showaudio audio/*zmessage/external-bodyr;z?showexternal /dev/null default john python.org     /tmp foo bar)NN)NN)NN)r8�
_run_cases)	r(�cZfnamer;Zaudio_basic_entryZaudio_entryZvideo_entryZ
message_entry�casesr+r+r,�test_findmatch�sH


zFindmatchTest.test_findmatch�posixz!Requires 'test' command on systemcCsLddigddigd�}|ddgidddiff|ddgidfg}|j|�dS)Nrztest 1 -eq 1ztest 1 -eq 0)z	test/passz	test/failz	test/passz	test/fail)NN)rP)r(rBrRr+r+r,�	test_test�s
zFindmatchTest.test_testcCs2x,|D]$}|jtj|d|d�|d�qWdS)Nrr
r)r'rZ	findmatch)r(rRrQr+r+r,rP�s
zFindmatchTest._run_casesN)
r=r>r?rS�unittestZ
skipUnlessr$�namerUrPr+r+r+r,rN�s3rN�__main__)rr$�copyZtest.supportrrVr!Zfindfiler0r8�deepcopyr3�valuesZ
entry_list�entry�popZTestCaserr@rNr=�mainr+r+r+r,�<module>sZ







BL


Youez - 2016 - github.com/yon3zu
LinuXploit